Managed in Unmanaged
-
Can i call a dll made in .net in vb6. My point is that we cannot call code written in managed environment(.net) in unmanaged code(vb6,c etc). Am i correct or is there a way to call managed code in unmanaged env.
-
Can i call a dll made in .net in vb6. My point is that we cannot call code written in managed environment(.net) in unmanaged code(vb6,c etc). Am i correct or is there a way to call managed code in unmanaged env.
The following artical is all you need http://samples.gotdotnet.com/quickstart/howto/doc/Interop/Building_Samples_COM2NET.aspx[^] Forever Developing
-
Can i call a dll made in .net in vb6. My point is that we cannot call code written in managed environment(.net) in unmanaged code(vb6,c etc). Am i correct or is there a way to call managed code in unmanaged env.
Nothing could be further from the truth. There is nothing stopping you from creating a component in managed code and calling it from unmanaged code. Exposing .NET Framework Components to COM[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
The following artical is all you need http://samples.gotdotnet.com/quickstart/howto/doc/Interop/Building_Samples_COM2NET.aspx[^] Forever Developing
I first created a type library of the ,net project and then registered the assembly by using regasm. Then i refered the library to the vb6 project. then when i tried to create an object of the library first it gave me this error "MSCOREE.DLL have been loaded" firts copy unknown second copy c:\windows\.....\mscorwks.dll this is typically caused by having a registered mscoree.dll that is different from the one that is statically linked with the application and the next error that follows "cannot create a file when that file already exists" i ran that project again and then i start recieveing these messages "ActiveX component can't create object" which is understandable. But when i tried to register the dll with regsvr32 cmd it again gave me error "Dll was loaded but DllregisterServer entry point was not found. The file cannot be registered." Am i doing something wrong?
-
Nothing could be further from the truth. There is nothing stopping you from creating a component in managed code and calling it from unmanaged code. Exposing .NET Framework Components to COM[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
I first created a type library of the ,net project and then registered the assembly by using regasm. Then i refered the library to the vb6 project. then when i tried to create an object of the library first it gave me this error "MSCOREE.DLL have been loaded" first copy unknown second copy c:\windows\.....\mscorwks.dll this is typically caused by having a registered mscoree.dll that is different from the one that is statically linked with the application and the next error that follows "cannot create a file when that file already exists" i ran that project again and then i start recieveing these messages "ActiveX component can't create object" which is understandable. But when i tried to register the dll with regsvr32 cmd it again gave me error "Dll was loaded but DllregisterServer entry point was not found. The file cannot be registered." Am i doing something wrong?