Dll load problem
-
hi, i have made a program that will load other programs from dll files. i have it working just fine on my own pc but when i go to have someone else test it, it fails to load anything at all. am i doing soemthign wrong with how i have my program loading the dll files?
-
hi, i have made a program that will load other programs from dll files. i have it working just fine on my own pc but when i go to have someone else test it, it fails to load anything at all. am i doing soemthign wrong with how i have my program loading the dll files?
swatgodjr wrote:
am i doing soemthign wrong with how i have my program loading the dll files?
When you are using the DLL on your M/C no problem because that DLL is already registered on your M/C When you use it on other M/C the Application is not able to find the Registered DLL. So try to register your DLL on Other M/C where you execute your Application. use Regsvr32 - for registration use Regsvr32 /u - for unregistration. Knock out 't' from can't, You can if you think you can :cool:
-
swatgodjr wrote:
am i doing soemthign wrong with how i have my program loading the dll files?
When you are using the DLL on your M/C no problem because that DLL is already registered on your M/C When you use it on other M/C the Application is not able to find the Registered DLL. So try to register your DLL on Other M/C where you execute your Application. use Regsvr32 - for registration use Regsvr32 /u - for unregistration. Knock out 't' from can't, You can if you think you can :cool:
-
swatgodjr wrote:
am i doing soemthign wrong with how i have my program loading the dll files?
When you are using the DLL on your M/C no problem because that DLL is already registered on your M/C When you use it on other M/C the Application is not able to find the Registered DLL. So try to register your DLL on Other M/C where you execute your Application. use Regsvr32 - for registration use Regsvr32 /u - for unregistration. Knock out 't' from can't, You can if you think you can :cool:
-
i tried to use that on another pc but it came back sayign it could not be found on the pc.
swatgodjr wrote:
i tried to use that on another pc but it came back sayign it could not be found on the pc.
Is it your DLL ( created by you for your application) ? if no then What is the name of the DLL ,that you trying to load ? Knock out 't' from can't, You can if you think you can :cool:
-
swatgodjr wrote:
i tried to use that on another pc but it came back sayign it could not be found on the pc.
Is it your DLL ( created by you for your application) ? if no then What is the name of the DLL ,that you trying to load ? Knock out 't' from can't, You can if you think you can :cool:
i made the dll myself, i am using LoadLibrary to load it in my program. originally my application was console based and it ran perfectly, loaded on any pc i put it on. but since turnign it into a dialog based gui application, using the exact same loading code, it fails to load now on any pc but mine.
-
i made the dll myself, i am using LoadLibrary to load it in my program. originally my application was console based and it ran perfectly, loaded on any pc i put it on. but since turnign it into a dialog based gui application, using the exact same loading code, it fails to load now on any pc but mine.
Pay special attention to the search order in the LoadLibrary documentation. Where your dll is in relation to the "Paths" searched is important. A_Laxman mentioned the COM based way of how the dll path is "registered" in the registry so an app can search the ProgId or CLSID of the component to obtain the info such as what it's path is. You are basically trying to achieve the same end via whatever means you have at your disposal. If you don't ensure your dll is located in one of the paths mentioned in the LoadLibrary documentation (Try not to rely on the PATH environment variable as this is a user configurable item and subject to change when users jack around with their settings), you might want to have your app installation msi place the path in your registry space for your installation. I do this and then retrieve the settings (including the path to the apps "bin" directory which is where I place my dll's). If your using VC++ 6.0, you will probably need the Visual Studio Enterprise Installer 1.1 to quickly build your MSI's. You really shouldn't be deploying apps that have dll's and other components without an MSI (at least in native C++ deployment) here's the link.. Visual Studio Installer[^] This also make COM component registration/unregistration an automated process and simplifies things since it puts your app in the add/remove programs applet window. -- modified at 11:23 Tuesday 23rd May, 2006
-
Pay special attention to the search order in the LoadLibrary documentation. Where your dll is in relation to the "Paths" searched is important. A_Laxman mentioned the COM based way of how the dll path is "registered" in the registry so an app can search the ProgId or CLSID of the component to obtain the info such as what it's path is. You are basically trying to achieve the same end via whatever means you have at your disposal. If you don't ensure your dll is located in one of the paths mentioned in the LoadLibrary documentation (Try not to rely on the PATH environment variable as this is a user configurable item and subject to change when users jack around with their settings), you might want to have your app installation msi place the path in your registry space for your installation. I do this and then retrieve the settings (including the path to the apps "bin" directory which is where I place my dll's). If your using VC++ 6.0, you will probably need the Visual Studio Enterprise Installer 1.1 to quickly build your MSI's. You really shouldn't be deploying apps that have dll's and other components without an MSI (at least in native C++ deployment) here's the link.. Visual Studio Installer[^] This also make COM component registration/unregistration an automated process and simplifies things since it puts your app in the add/remove programs applet window. -- modified at 11:23 Tuesday 23rd May, 2006
the way my app works is nothign really big and complicated, its just a simple program i made to mess aroudn with. i do not "install" it on a pc in any way, i just send it to friends to test if it works. basically you open the exe, go into a screen where you type in the dll to load and the program loads it. its not complicated at least not in my eyes. i did notice that on my pc loadlibrary call is all i need to load the dll file, i do not have to get any addresses to the functions. but when i tell it to do that it crashes after i close the dll. my consoel based version works perfectly on any pc yet migrating the whole thing over to gui based seems to have changed how it does the loading of my dll files.