Class import problem

Ariez

Well-known member
Joined
Feb 28, 2003
Messages
164
I got this Library that ive imported: winawsrv.dll.
The PCanywhere library ive converted from the winawsrv.tlb.
Now i can see all of the member classes in the object browser (see the pic)
Now ive tried to register the dll with regsvr32 but I get: "winawsrv.dll was loaded, but the DllRegisterServer entry point was not found"

within the environment, when i make these calls:
Dim pcaManager As New winawsrv.CHostDataManagerClass()
Dim pcaData As New winawsrv.CHostDataClass()


the first call passes, but I get the following:

An unhandled exception of type System.Runtime.InteropServices.COMException occurred in PoLLit.exe

Additional information: COM object with CLSID {0B30DAC0-B532-11D2-8177-300A44000000} is either not valid or not registered


I can see the class in the object browser, how is that I cant use it???? I can seem to be able to get out of this, ever,please help!!!
 

Attachments

If you have the source code available to you, you have to put the DllRegisterServer function into it. If you dont have the source code then I dont think youll get somewhere with this.
 
No I dont have the source. Its not a native .NET dll. I imported it from a .tlb with the tlbimp.exe that comes with the Studio.

the tlbimp makes a wrapper for the library so i can see it in the object browser. But the wrapper doesnt seem to be good enough.
this is wierd though, because as u can see the component is exposed in the object browser....
 
Im also having an identical problem with a third party COM DLL, uniobjects.dll.
How do I properly register the Runtime Callable Wrapper generated by tlbimp? Do I have to create a Stongly named assembly and add it to the assembly cache of the target machine? If so, I cant register it as I need the original code to do that.
The code I am using is as follows (the 2nd line throws the same exception that Ariez got)
Code:
Dim UvSession as Object
Dim uvType As Type = GetType(UNIOBJECTSLib.UnioaifCtrlClass)
UvSession = Activator.CreateInstance(uvType)
where UNIOBJECTSLib is in the project references.
I can also see all properties and methods in the DLL by using the object browser

Any help greatly appreciated
Regards, Scott
 
I have also the same problem as Ariez.I refer nctdialogicvoice2lib.dll file with the Add Reference.I also see the classes of this dll file but if I run it gives such an error:

An unhandled exception of type System.Runtime.InteropServices.COMException occurred in SampleCSDialogicGetBuffer.exe

Additional information: COM object with CLSID {AD3E2FA8-E18A-40E1-AE97-655B0F1C906A} is either not valid or not registered.

I deal with this problem 6 days and didnt found any solution for that.
 
Did you register the DLL? Youll probably need to register the TLB too.

Start >> Run >> regsvr32 <path to dll or tlb>
 
I deal with this problem 6 days and didnt found any solution for that
I still havent found...

I inserted the CLSID manually in the registry, and it didnt help.

fatihsen did you also use the Tlbimport?
 
I used tlbimp but it didnt work maybe I used it correctly.

I am writing a program with WindowsMediaServices SDK and as yours, the classes appear in the program; they compile; but @ runtime it gives the same error (CLSID..not registered..blabla)

I tried tlbimp xxxx.dll, it produced some more dlls but it still doesnt work....
 
Hey gensunasumus, Im not in that project anymore so i cant test.
But Voltface said to register the tlb along with the dll...I dont remember having tried this one (register the tlb also i mean).
Im very curious to know if you succeeded with this method..(or any other, so keep posting)
thanks...
 
Im having the same issue. Any more ideas?

Were changing file-level permissions on a directory of pdfs from an app written in .net.

Application references ActiveDs (Interop.ActiveDs.dll) which comes from c\winnt\system32\activeds.tlb using VS.NET 2003.

Application works FINE on local computer where it is compiled. We get the following error when we copy the application to a server (Win2000):

"COM object with CLSID {F270C64A-FFB8-4AE4-85FE-3A75E5347966} is either not valid or not registered

So we use RegSvr32 on Interop.ActiveDs.dll and activeds.tlb, both of which give this error:

"loaded, but the DllRegisterServer entry point was not found."

Application still wont work on the server and gives the same error. Help!
 
Next I added corresponding registry entries for {F270C64A-FFB8-4AE4-85FE-3A75E5347966} to the server which existed on my local machine.

So, now Im getting, "ClassFactory cannot supply requested class."

Not sure what to do next?
 
You may try with the following:

1. Register the COM component using regsvr32 utility
2. Use tlbimp.exe to create a com wrapper .
3. Copy the assembly into the /bin direcory.

In order to understand how to use wrapper assembly you may use ildasm.exe to examine the structure of wrapper assembly.

Hope to help.
 
There was a utility for Registering TLBs. REG*TLB.exe but I couldnt find it, the TLB needs to be registered using a specific method(Regsvr32 wont work seeing as TLBs dont have DLLRegisterServer APIs)

If you register the TLB you shouldnt need to register the DLL since the TLB is the exposed DLL methods but you still may need to register both or the .Net dll into the GAC
 
Thank you AndreRyan and Jitesh for your posts.

AndreRyan, I tried the application you offered, which is pretty cool, but hasnt fixed the problem yet. Do you think Ive messed my registry up by adding entries manually? Should I remove them and the use this tool again?

I believe TLBImp.exe is built-in to VS.NET and used when adding corresponding references.
 
Back
Top