• Welcome to Theos PowerBasic Museum 2017.

UnRegisterTypeLib() Problem

Started by Frederick J. Harris, April 13, 2010, 07:38:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frederick J. Harris

Hello Jose And All!

    Having something of an unexpected glitch here.  I just posted a GUI version of the COM Exe Server I've been working on down in my board.  One of the last issues I wanted to fix was the addition of the UnRegistration code, as I had just left it unimplemented in what I posted Sunday.  However, the function UnRegisterTypeLib() in OleAuto.inc file seems to be giving me strange problems.  I'm just drawing a total blank on this.  Don't have a clue.  The program compiles fine but as soon as the exe starts I get a message from Windows...

"The procedure entry point UnregisterTypeLib could not be found in the dynamic link library OleAuto32.dll"

And the program terminates.

I checked out your declares in OleAuto.inc for both LoadTypeLibEx() and UnRegisterTypeLib() and they are as follows...


'DECLARE FUNCTION LoadTypeLibEx LIB "OLEAUT32.DLL" ALIAS "LoadTypeLibEx" ( _
'   BYVAL DWORD _                       ' __in  LPCOLESTR szFile
' , BYVAL LONG _                        ' __in  REGKIND regkind
' , BYREF ITypeLib _                    ' __out ITypeLib** pptlib
' ) AS LONG                             ' HRESULT

'DECLARE FUNCTION UnregisterTypelib LIB "OLEAUT32.DLL" ALIAS "UnregisterTypelib" ( _
'   BYREF GUID _                        ' __in REFGUID libID
' , BYVAL WORD _                        ' __in unsigned short wVerMajor
' , BYVAL WORD _                        ' __in unsigned short wVerMinor
' , BYVAL LONG _                        ' __in LCID lcid
' , BYVAL LONG _                        ' __in SYSKIND syskind
' ) AS LONG                             ' HRESULT


I noticed the 'R' in 'UnRegisterTypeLib' wasn't capitalized in your include and it is in the MSDN and OleAuto.h C header so I tried capitalizing it in the Alias clause but no luck.  Still get the error!

Do you have any idea what's going on here Jose?  I just posted the code down below.  The offending UnRegisterTypeLib() call is commented out down in CC.inc toward the bottom.  The code is compilable and runnable as is with the offending code commented out like I have it.  

Really strange.  There isn't any problem with LoadTypeLibEx right above UnRegisterTypeLib, but it doesn't like UnRegisterTypeLib today!

Frederick J. Harris

Uh Oh!  I think I spotted the problem!  I have the L in Typelib capitalized!

Frederick J. Harris

Just found the problem!  The 'L' in UnRegisterTypeLib is capitalized.  I opened up Oleauto32.dll in Notepad and actually looked for the symbol.  When I changed it in Oleauto.inc it compiled and ran.

José Roca

 
Thanks for spotting it. I will change the declare.