Interoperation / Office Integration Topics include: COM, P/Invoke (e.g. Win32 API), marshaling, distributed applications, VBA and interacting with office apps

Go Back  Xtreme .NET Talk > .NET > Interoperation / Office Integration > Class import problem


Reply
 
Thread Tools Display Modes
  #1  
Old 04-02-2003, 01:48 AM
Ariez Ariez is offline
Centurion

Preferred language:
VB.NET
 
Join Date: Feb 2003
Posts: 164
Ariez is on a distinguished road
Default Class import problem

I got this Library that i've imported: winawsrv.dll.
The PCanywhere library i've converted from the winawsrv.tlb.
Now i can see all of the member classes in the object browser (see the pic)
Now i've 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 can't use it???? I can seem to be able to get out of this, ever,please help!!!
Attached Images
File Type: jpg winawsrv.jpg (76.7 KB, 153 views)
Reply With Quote
  #2  
Old 04-07-2003, 10:16 PM
mutant
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #3  
Old 04-08-2003, 02:16 AM
Ariez Ariez is offline
Centurion

Preferred language:
VB.NET
 
Join Date: Feb 2003
Posts: 164
Ariez is on a distinguished road
Default

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 doesn't seem to be good enough.
this is wierd though, because as u can see the component is exposed in the object browser....
__________________
Auto-suggestion: "I have a life"
Uncontroled thinking: "So what the.."
Reply With Quote
  #4  
Old 04-08-2003, 10:29 AM
Derek Stone's Avatar
Derek Stone Derek Stone is offline
Exalted One

Preferred language:
C#
 
Join Date: Nov 2002
Location: Rhode Island, USA
Posts: 1,877
Derek Stone is on a distinguished road
Default

Is the DLL properly registered? The error that you are getting indicates that it is not.
__________________
Posting Guidelines
Reply With Quote
  #5  
Old 07-02-2003, 11:23 AM
scottgl scottgl is offline
Newcomer

Preferred language:
VB.NET
 
Join Date: Jul 2003
Posts: 1
scottgl is on a distinguished road
Default

I'm 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 can't 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
Reply With Quote
  #6  
Old 08-15-2003, 09:32 AM
gensunasumus gensunasumus is offline
Newcomer
 
Join Date: Aug 2003
Posts: 2
gensunasumus is on a distinguished road
Default

Yeah I have the same problem if anyone has a solution please let us know...

Thanks in advance..
Reply With Quote
  #7  
Old 08-15-2003, 09:52 AM
fatihsen fatihsen is offline
Newcomer

Preferred language:
C#
 
Join Date: Aug 2003
Location: Istanbul/Turkiye
Posts: 4
fatihsen is on a distinguished road
Default

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 didn't found any solution for that.
Reply With Quote
  #8  
Old 08-15-2003, 11:07 AM
Volte Volte is offline
Neutiquam Erro

Preferred language:
C# and VB.NET
 
Join Date: Nov 2002
Posts: 2,171
Volte is on a distinguished road
Default

Did you register the DLL? You'll probably need to register the TLB too.

Start >> Run >> regsvr32 <path to dll or tlb>
Reply With Quote
  #9  
Old 08-17-2003, 05:03 AM
Ariez Ariez is offline
Centurion

Preferred language:
VB.NET
 
Join Date: Feb 2003
Posts: 164
Ariez is on a distinguished road
Default

Quote:
I deal with this problem 6 days and didn't found any solution for that
I still haven't found...

I inserted the CLSID manually in the registry, and it didn't help.

fatihsen did you also use the Tlbimport?
__________________
Auto-suggestion: "I have a life"
Uncontroled thinking: "So what the.."
Reply With Quote
  #10  
Old 08-17-2003, 11:03 AM
gensunasumus gensunasumus is offline
Newcomer
 
Join Date: Aug 2003
Posts: 2
gensunasumus is on a distinguished road
Default

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 dll's but it still doesn't work....
Reply With Quote
  #11  
Old 08-19-2003, 03:21 AM
Ariez Ariez is offline
Centurion

Preferred language:
VB.NET
 
Join Date: Feb 2003
Posts: 164
Ariez is on a distinguished road
Default

Hey gensunasumus, I'm not in that project anymore so i can't 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).
I'm very curious to know if you succeeded with this method..(or any other, so keep posting)
thanks...
__________________
Auto-suggestion: "I have a life"
Uncontroled thinking: "So what the.."
Reply With Quote
  #12  
Old 09-11-2003, 02:01 PM
russ_sutton russ_sutton is offline
Newcomer
 
Join Date: Sep 2003
Posts: 3
russ_sutton is on a distinguished road
Default

I'm having the same issue. Any more ideas?

We're 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 won't work on the server and gives the same error. Help!
Reply With Quote
  #13  
Old 09-18-2003, 10:39 AM
russ_sutton russ_sutton is offline
Newcomer
 
Join Date: Sep 2003
Posts: 3
russ_sutton is on a distinguished road
Default

Next I added corresponding registry entries for {F270C64A-FFB8-4AE4-85FE-3A75E5347966} to the server which existed on my local machine.

So, now I'm getting, "ClassFactory cannot supply requested class."

Not sure what to do next?
Reply With Quote
  #14  
Old 09-20-2003, 12:05 AM
AndreRyan AndreRyan is offline
Junior Contributor

Preferred language:
VB.Net
 
Join Date: Jan 2002
Posts: 366
AndreRyan is on a distinguished road
Default

I'm not sure if this is of any use but you can try it. It's a COM system registration program, it should be able to Register DLLs, EXEs and TLBs using the TypeLibInfo Class
Attached Files
File Type: zip type library registration program.zip (4.9 KB, 47 views)
__________________
.Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
Reply With Quote
  #15  
Old 09-20-2003, 12:40 AM
Jitesh Jitesh is offline
Freshman

Preferred language:
VB,C#
 
Join Date: Sep 2003
Location: India
Posts: 39
Jitesh is on a distinguished road
Default

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.
__________________
Jitesh Sinha
Reply With Quote
  #16  
Old 09-21-2003, 06:51 AM
AndreRyan AndreRyan is offline
Junior Contributor

Preferred language:
VB.Net
 
Join Date: Jan 2002
Posts: 366
AndreRyan is on a distinguished road
Default

There was a utility for Registering TLBs. REG*TLB.exe but I couldn't find it, the TLB needs to be registered using a specific method(Regsvr32 won't work seeing as TLBs don't have DLLRegisterServer APIs)

If you register the TLB you shouldn't 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
__________________
.Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
Reply With Quote
  #17  
Old 09-22-2003, 09:12 AM
russ_sutton russ_sutton is offline
Newcomer
 
Join Date: Sep 2003
Posts: 3
russ_sutton is on a distinguished road
Default

Thank you AndreRyan and Jitesh for your posts.

AndreRyan, I tried the application you offered, which is pretty cool, but hasn't fixed the problem yet. Do you think I've 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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Having a problem getting class. patrick24601 Visual Basic .NET 1 06-08-2005 01:56 PM
Import Problem HalaszJ ASP.NET 2 10-19-2003 03:08 AM
Import problem JDogg Interoperation / Office Integration 3 09-02-2003 02:53 PM
Class Problem Cyrus General 3 08-15-2003 03:22 PM
Problem with Registry class TechnoTone Directory / File IO / Registry 1 01-27-2003 09:25 AM

Advertisement:

Powered by liquidweb