|
-
Feb 10th, 2012, 04:06 AM
#1
Thread Starter
Junior Member
Import DLL manually
Hi people !! 
Well... I'm developing an application and I need to know how I can to import a DLL with code and not with "Add reference" because path will be change when I connect to other computer.
The library I need to import is ADOX but Maybe it will be used by me with another dlls 
Thanks for y'all!!
-
Feb 10th, 2012, 04:17 AM
#2
Lively Member
Re: Import DLL manually
If you create windows application, you can add that DLL file while creating setup and deployment. You can use anywhere. DLL will be inbuilt with you Setup file. (Only in Windows application)
-
Feb 10th, 2012, 04:41 AM
#3
Thread Starter
Junior Member
Re: Import DLL manually
Well... I don't know it, but I don't want to make a setup because I want that my application will be portable 
Although I will try it 
Thanks !!!
-
Feb 10th, 2012, 04:57 AM
#4
Lively Member
Re: Import DLL manually
for portable, you can keep that DLL file in BIN folder. Use the code to read the path from computer, where you going to use.
-
Feb 10th, 2012, 05:09 AM
#5
Re: Import DLL manually
You're going about this all wrong. ADOX is a COM library and it's part of Windows. You absolutely do NOT need to load it dynamically. You MUST reference it at design time, no question. You don't have to care where the library is. It's a registered COM component, so it will always be accessible.
When you reference a COM component or ActiveX control, an Interop DLL will be created. It is a .NET assembly that provides the bridge between the managed code of your app and the unmanaged code of the COM component, allowing them to INTEROPerate. That DLL must be deployed with your EXE and placed in the same folder. That's it, that's all.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|