Click here to Skip to main content
15,919,749 members
Home / Discussions / COM
   

COM

 
Questionsaving drawings Pin
_tasleem10-Mar-06 23:06
_tasleem10-Mar-06 23:06 
QuestionProblem customizing hosted Internet Explorer Pin
q_q_q10-Mar-06 6:27
q_q_q10-Mar-06 6:27 
QuestionImplementing MDI in an ActiveX control Pin
zulat10-Mar-06 0:01
zulat10-Mar-06 0:01 
QuestionPassing the COM Interface reference Pin
itkid9-Mar-06 21:44
itkid9-Mar-06 21:44 
AnswerRe: Passing the COM Interface reference Pin
Roger Stoltz10-Mar-06 1:53
Roger Stoltz10-Mar-06 1:53 
QuestionRPC System Fail in Windows NT 4 & mswinsck.ocx missing Pin
TheKriminal9-Mar-06 0:50
TheKriminal9-Mar-06 0:50 
QuestionHelp Me! Thank you very much! Pin
Best Kiluyar8-Mar-06 20:52
Best Kiluyar8-Mar-06 20:52 
AnswerRe: Help Me! Thank you very much! Pin
Lim Bio Liong9-Mar-06 19:58
Lim Bio Liong9-Mar-06 19:58 
Hello smallbluedemon,

1. Make sure that you have set the resource type to be "TYPELIB" and have also set the resource ID to be 1.

2. Try out the following function to load your resource-embedded type library binary :

HRESULT MyLoadTypeLibrary(ITypeLib** ppITypeLibReceiver)
{
TCHAR szFileName[_MAX_PATH];

memset (szFileName, 0, sizeof(szFileName));
GetModuleFileName
(
(HMODULE)NULL,
(LPTSTR)szFileName,
(DWORD)sizeof(szFileName)
);

// Need to concatenate a \1 to the end of the filename
// because we are acquiring the type library which is
// embedded as the 1st resource of type TYPELIB.
strcat (szFileName, "\\1");

return LoadTypeLib((const OLECHAR FAR*)_bstr_t(szFileName), ppITypeLibReceiver);
}


Use it in your code this way :

int main(int argc, char* argv[])
{
CComPtr<ITypeLib> pTypeLib;

MyLoadTypeLibrary(&pTypeLib);

return 0;
}

Pls let me know how things go Smile | :)

Best Regards,
Bio.

GeneralRe: Help Me! Thank you very much! Pin
Best Kiluyar9-Mar-06 22:18
Best Kiluyar9-Mar-06 22:18 
GeneralRe: Help Me! Thank you very much! Pin
Lim Bio Liong9-Mar-06 22:47
Lim Bio Liong9-Mar-06 22:47 
QuestionHow to Drawing in word Through C# Pin
sam_g18-Mar-06 0:36
sam_g18-Mar-06 0:36 
QuestionSystem.Runtime.InteropServices.COMException (0x800C0008): The download of the specified resource has failed. Pin
imunevar7-Mar-06 15:24
imunevar7-Mar-06 15:24 
QuestionAbout Remoting topic Pin
ashishnagar17-Mar-06 2:21
ashishnagar17-Mar-06 2:21 
Questionworking with VB .dll Pin
_kane_7-Mar-06 1:03
_kane_7-Mar-06 1:03 
QuestionHow to connect to the Automation server which is not registered in ROT. Pin
oleg636-Mar-06 5:37
professionaloleg636-Mar-06 5:37 
QuestionHow to trap IE refresh Pin
tenali_gowda5-Mar-06 20:41
tenali_gowda5-Mar-06 20:41 
QuestionPassing user defined object between COM component and client Pin
dario_alvarez5-Mar-06 12:37
dario_alvarez5-Mar-06 12:37 
QuestionBSTR problems in COM Service Pin
RobCraig3-Mar-06 9:12
RobCraig3-Mar-06 9:12 
AnswerRe: BSTR problems in COM Service Pin
Gerald Schwab3-Mar-06 10:02
Gerald Schwab3-Mar-06 10:02 
GeneralRe: BSTR problems in COM Service Pin
RobCraig3-Mar-06 11:58
RobCraig3-Mar-06 11:58 
QuestionHow to detect ActiveX on IE when it begins run using BHO? Pin
Blue-Bird1-Mar-06 21:09
Blue-Bird1-Mar-06 21:09 
QuestionUsing ActiveX in MFC Pin
lroels1-Mar-06 20:36
lroels1-Mar-06 20:36 
Questionout of process activex exe Pin
david_reynolds28-Feb-06 9:16
david_reynolds28-Feb-06 9:16 
AnswerRe: out of process activex exe Pin
Roger Stoltz28-Feb-06 21:23
Roger Stoltz28-Feb-06 21:23 
GeneralRe: out of process activex exe Pin
david_reynolds1-Mar-06 3:11
david_reynolds1-Mar-06 3:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.