Calling .dll from a C# application (problem when outside VS2010)
-
Hi all, I have a C# application that uses vpc.dll. The application works without problems when running in VS. I have added a reference to the vpc.dll which reisdes in the project location (the same path as the .exe). However, when I install the application on a client machine (using SetupProject in VS where I have included the vpc.dll to the application folder) the call to vpc.dll fails. Basically it will not run at all. I'm fairly new to computer programming, but I find it strange that it works inside VS, but not when installed on client machine. Thanks for any pointers!
-
Hi all, I have a C# application that uses vpc.dll. The application works without problems when running in VS. I have added a reference to the vpc.dll which reisdes in the project location (the same path as the .exe). However, when I install the application on a client machine (using SetupProject in VS where I have included the vpc.dll to the application folder) the call to vpc.dll fails. Basically it will not run at all. I'm fairly new to computer programming, but I find it strange that it works inside VS, but not when installed on client machine. Thanks for any pointers!
-
If this is a COM dll, you will need to register it on the client machine. Include the registration process in the setup install program.
Hi, I have tried to register the .dll but I get an error message like "DllRegister" was not found, not a valid DLL or OCX file.... Not sure what this means but I've tried this both on the development machine and on the client machine.
-
Hi, I have tried to register the .dll but I get an error message like "DllRegister" was not found, not a valid DLL or OCX file.... Not sure what this means but I've tried this both on the development machine and on the client machine.
You said you set a reference to this .DLL?? That means it's COM-based. But now you're saying that if you execute "REGSVR32 vpc.dll" it complains that it can't find DllRegister. That means it's NOT COM-based. I get the feeling you didn't set a reference to it because what you're saying is contradictory to itself.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Hi all, I have a C# application that uses vpc.dll. The application works without problems when running in VS. I have added a reference to the vpc.dll which reisdes in the project location (the same path as the .exe). However, when I install the application on a client machine (using SetupProject in VS where I have included the vpc.dll to the application folder) the call to vpc.dll fails. Basically it will not run at all. I'm fairly new to computer programming, but I find it strange that it works inside VS, but not when installed on client machine. Thanks for any pointers!
Kaare Tragethon wrote:
the call to vpc.dll fails. Basically it will not run at all.
My suspicion is that you are missing something that vpc.dll is dependent on. Is this Virtual PC that you are trying to run?
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
You said you set a reference to this .DLL?? That means it's COM-based. But now you're saying that if you execute "REGSVR32 vpc.dll" it complains that it can't find DllRegister. That means it's NOT COM-based. I get the feeling you didn't set a reference to it because what you're saying is contradictory to itself.
A guide to posting questions on CodeProject[^]
Dave KreskowiakI get the feeling (having tried to find out what vpc.dll was) that he's followed these[^] steps, so it's the wrapper for the COM client.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Kaare Tragethon wrote:
the call to vpc.dll fails. Basically it will not run at all.
My suspicion is that you are missing something that vpc.dll is dependent on. Is this Virtual PC that you are trying to run?
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
You are correct, it is VirtualPC. I've "extracted" a .dll from the vpc.exe file (using tlbimp vpc.exe /out vpc.dll). I've tried searching google A LOT, but there's very little (or no) documentation on this that I can find.... The only thing I could find was the above "extract" method.... Thanks!
-
You are correct, it is VirtualPC. I've "extracted" a .dll from the vpc.exe file (using tlbimp vpc.exe /out vpc.dll). I've tried searching google A LOT, but there's very little (or no) documentation on this that I can find.... The only thing I could find was the above "extract" method.... Thanks!
Right - chances are then that the actual Virtual PC client isn't installed on the end users machine. Basically, your DLL is a wrapper for the COM calls - it's not a COM component so you don't need to register it, but it does need the actual COM object registered; in this case Virtual PC.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
I get the feeling (having tried to find out what vpc.dll was) that he's followed these[^] steps, so it's the wrapper for the COM client.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
Ahh, now it makes sense.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Right - chances are then that the actual Virtual PC client isn't installed on the end users machine. Basically, your DLL is a wrapper for the COM calls - it's not a COM component so you don't need to register it, but it does need the actual COM object registered; in this case Virtual PC.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
I see, thanks for the help!! :-)
-
I see, thanks for the help!! :-)
No problem. I'm glad I could be of assistance.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility