Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C++ to C#

Status
Not open for further replies.

SpiderBear6

Programmer
Sep 17, 2003
422
AU
Does anyone know how to convert this C++ code into c# or whether it is possible?

Code:
IOleCommandTarget* pCmdTarg;
pWB->QueryInterface(IID_IOleCommandTarget, (void**)&pCmdTarg);

VARIANT vTemplatePath;
V_VT(&vTemplatePath) = VT_BSTR;
V_BSTR(&vTemplatePath) = SysAllocString(L"c:/MyTemplate.htm");
pCmdTarg->Exec(&CGID_MSHTML,
               IDM_PRINT,
               OLECMDEXECOPT_PROMPTUSER,
               &vTemplatePath,
               NULL);
[\code]

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top