call to a DLL located on a server

hi
i have this function it uses the c++ dll sks.dll,
this dll is located on my machine, can i put this dll on a server someplace and let my vb.net application use this dll without having it on the local machine??
i mean only 1 dll and all the clients use it on the remote server where i have his IP or name... (it's a local network)


Private Declare Function GetCurrentRoundNumber Lib "sks.dll" () As Integer
LVL 3
mte01Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

possekeCommented:
Hi,

I'm just guessing here but, if I recall thi sone correct, this may work:

Private Declare Function GetCurrentRoundNumber Lib "\\SERVERNAME\DLLFOLDER\sks.dll" () As Integer
OR
Private Declare Function GetCurrentRoundNumber Lib "\\192.168.1.X\DLLFOLDER\sks.dll" () As Integer

Don't shoot me for being wrong, but I seem to have done this once like this ?!

Just try it!!

Greets,

Po$$e
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mte01Author Commented:
Bam Bam...
noooo I’m not shooting you, it's just that this works... but hummm anyone can now access the shared folder and steal my precious DLL, how can I prevent them from such hideous act??
i can't shoot them.. What else can i do? Can i pass credentials with the DLL path??
Cheers
0
possekeCommented:
I'll comment this asap, but i have to go for an hour now so be patient ;)

Po$$e
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

possekeCommented:
Hi mte01,

Preventing from other people accessing your shared folder, that is something done with permissions. (NTFS or share permissions)
I'm no expert in that subject, but if you share the folder that contains the DLL, you can also grant or deny access to different persons.

Since you're working on a local network, set-up for permissions should not be a hard job!

But I'm sorry, that is one thing I can't fully explain, I just know you have to put permissions on the shared folder!!

Greetz,

Po$$e
0
mte01Author Commented:
thanks posseke
got me in another problem...


Private Const dllLocatio As String = "sks.dll"
Private Declare Function StopIssue Lib dllLocatio () As Integer


this is not being compiled, it's giving an error on the variable dllLocatio, it says that string constant expected, any idea why and how to get rid of that...
what i am going to do is to place the name of the dll in one place so i dont have to change it every time in like 100 place..
0
possekeCommented:
Hi,

what about this:

I'm afraid that what you are trying to do is not valid...the compiler just won't buy that kinda trick :d
I have never done this like you are doing now, and I believe it is a bad practice too...

My suggestion to you is to manually alter it in the 100 places with the exact string of the DLL location, Copy-Paste is not so slow like you think :)

What else you could do is declare this function as public & shared in a new class.
This way, you only have to change the one class that contains the declaration, and import this class in every other one that needs to use this method...

Greets,

po$$e
0
mte01Author Commented:
ok thanks for the info.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.