Add a dll in vb6
-
hahahaha.. thanks for a valueable information ... I suggested was for vb6.... So try as I am talking about vb6.
-
hahahaha.. thanks for a valueable information ... I suggested was for vb6.... So try as I am talking about vb6.
-
"did you try to add the reference in vb.net..." didn't know you were talking about VB6:confused:
TOXCCT >>> GEII power
[toxcct][VisualCalc]you missed two words from my quoted sentence "As well" let me put the complete sentence again did you try to add the reference in vb.net as all I guess you need a forum for English Grammer as well. note::: dont miss as well in the above line Search for that..
-
you missed two words from my quoted sentence "As well" let me put the complete sentence again did you try to add the reference in vb.net as all I guess you need a forum for English Grammer as well. note::: dont miss as well in the above line Search for that..
-
Hi All, Ive got a third party program that im trying to use in vb6. However it references a dll that cant be found (well its there but I dont know how to add it to the project) Debugging highlights this bit of code: ab = dll_ss12_dosomething( _ ab1, _ ab2, _ ab3) I know which dll to call as it is an app specific dll but I dont know how to reference it correctly in vb6. There are tons of examples on how to do it in vb.net and even the support manual shows how to do this in vb.net but not vb6. Oh and vb6 is supported by this app. Any help would be greatly appreciated. Thanks! Nic:confused:
If you do not call a DLL directly in VB6 you do not need to reference the DLL in VB6. If your main DLL requires a second DLL that you never call explicitly, this is not a VB6 problem. Either the DLL is not registered properly if it is a COM DLL, or it is either corrupt, not the correct version, or not installed to the correct location if it is a standard DLL. The first step in solving your problem is to determine if the "missing" DLL is a COM component. If it is, make sure it is registered properly. Beyond that, your information is too vague to be of much use. If it is a third party package, try contacting the people who created it. Robert
-
If you do not call a DLL directly in VB6 you do not need to reference the DLL in VB6. If your main DLL requires a second DLL that you never call explicitly, this is not a VB6 problem. Either the DLL is not registered properly if it is a COM DLL, or it is either corrupt, not the correct version, or not installed to the correct location if it is a standard DLL. The first step in solving your problem is to determine if the "missing" DLL is a COM component. If it is, make sure it is registered properly. Beyond that, your information is too vague to be of much use. If it is a third party package, try contacting the people who created it. Robert
Thanks for that guys. I guess my vagueness is attributed to the fact that vb6 is not my strong point. Its not a COM DLL. From my understanding there are 2 steps required for using a dll. (1) The declare statement passing arguments byVal and (2) Calling the DLL procedure. Now Ive done the Declare statement correctly but when I actually call the dll in the code it comes up with a run time error "53": File not found (ss12.dll) Now what Im assuming is that there must be a way to map a path to this dll? Am I right in assuming this? Once again I thank you all for assisting me with this. Nic
-
Thanks for that guys. I guess my vagueness is attributed to the fact that vb6 is not my strong point. Its not a COM DLL. From my understanding there are 2 steps required for using a dll. (1) The declare statement passing arguments byVal and (2) Calling the DLL procedure. Now Ive done the Declare statement correctly but when I actually call the dll in the code it comes up with a run time error "53": File not found (ss12.dll) Now what Im assuming is that there must be a way to map a path to this dll? Am I right in assuming this? Once again I thank you all for assisting me with this. Nic
Unfortunately calling non-COM dlls is not that simple. ByVal is not a general rule by any means, many if not even most parameters must be passed ByRef. Also, you have to translate some C/C++ types into VB-friendly data types. Many types commonly used in C/C++ can be translated into VB types but not all. There is no guarantee that you can call all functions exposed by a non-COM DLL. Writing proper Declare statements is part experience, part trial and error. Save your work frequently - improperly declared DLL calls can often cause your application to crash. There are rules that Windows uses to locate DLLs. Generally if you put the DLL in either the application folder or the WinSys folder, it will be found. Robert
-
Unfortunately calling non-COM dlls is not that simple. ByVal is not a general rule by any means, many if not even most parameters must be passed ByRef. Also, you have to translate some C/C++ types into VB-friendly data types. Many types commonly used in C/C++ can be translated into VB types but not all. There is no guarantee that you can call all functions exposed by a non-COM DLL. Writing proper Declare statements is part experience, part trial and error. Save your work frequently - improperly declared DLL calls can often cause your application to crash. There are rules that Windows uses to locate DLLs. Generally if you put the DLL in either the application folder or the WinSys folder, it will be found. Robert
Hi Robert, Thank you for your reply. I tried putting the dll in question into the application folder (I assume this is the folder in which the vb project resides in?) - Unfortunately again it says that the dll could not be found. Now when you say WinSys folder do you mean the system/system32 folder in the windows directory? I tried putting them in both folders but unfortunately again no go - File not found: Run time error 53 Any other thoughts?
-
Hi Robert, Thank you for your reply. I tried putting the dll in question into the application folder (I assume this is the folder in which the vb project resides in?) - Unfortunately again it says that the dll could not be found. Now when you say WinSys folder do you mean the system/system32 folder in the windows directory? I tried putting them in both folders but unfortunately again no go - File not found: Run time error 53 Any other thoughts?
Post the exact name of your DLL, and an example of your declare statement in VB and I will look at it. If you wish you can e-mail me the DLL itself too - rwest_graham@yahoo.com Robert
-
Post the exact name of your DLL, and an example of your declare statement in VB and I will look at it. If you wish you can e-mail me the DLL itself too - rwest_graham@yahoo.com Robert
Hi Robert, Thanks for your help but I actually worked it out. It couldnt find the dll cause the system path did not have the dir to the dll location at all. I put it in and it worked like a treat. By system path I mean if you go into the properties of my computer and then onto environment variables you can specify the path where dll's are stored and if you do this it works. Once again I thank you and all who posted for your help. Great help -> Great Forum :-D Nic