We help IT Professionals succeed at work.

Converting C++ to Delphi

paulocbb
paulocbb used Ask the Experts™
on
Is there any equivalent function in for "__uuidof"?

The problem: swapchain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&pBackBuffer);

how do __uuidof on delphi ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Oracle dba
Top Expert 2009
Commented:
yes, check this
http://docwiki.embarcadero.com/RADStudio/en/Uuidof


what delphi version are you using ?
Geert GOracle dba
Top Expert 2009
Commented:
actually you don't need to cast with the function
the GetBuffer will take the TGUID as parameter:

swapchain.GetBuffer(0, ID3D11Texture2D, ...


based on this translation resource:
http://www.delphipraxis.net/104451-uebersetzen-eines-c-codeschnipsels-nach-delphi.html
Sinisa VukSoftware architect
Top Expert 2012
Commented:
Try:

swapchain.GetBuffer(0, TGUID(ID3D11Texture2D), pBackBuffer);

Open in new window


If you try to convert directx > 9.2 for delphi you should look:

http://directxfordelphi.blogspot.com/