I know I must have asked this before, and either did not understand, or did not get a usable answer (and danged if I can find a link to verify that it was not just a fleeting thought
)
Anyways, maybe not the best forum (but probably the BEST since I know the reputations of many of you out there)
I am revisiting code of my past, and planning for the future (mostly fixing "mistakes" I made then that now I think my coding "Style" would best taking what I had and apply what I know now
)
In the realm of me making a DLL (created in PB) and distribute to users of multiple languages (VB, C, Labview, .Net, Java, OOK, Matlab, LabWindows...and etc) I am looking to compile once, distribute many times sort of thing, so I do not really care the language, just that my code works.
(Bonus Points for those of you that know what language "Ook" is
)
Anyways, PB allows you to LoadLibrary and GetProcAddress and Call DWORD to allow you to Load the Dll, then get the address of the function you wish to call, and then a way to call the function. (in this way you can KNOW that all parts exist, and not crash out because you had a missing peice of the puzzle)
Now my question is "How the HECK do you do it in another language????" (Most popular would be in VB for us "VB-Refugee" types)
API? Compiler? some trick that I do not know of??? (I am looking for generics here, so probably API is the common link)
Right now my only idea is "CallWindowProc" but I think that only calls the window process (or callback) so I would need to add code there to allow the user to call the function I need????
Is there a way to get the function and just call it if I know what the format of the function is????
aka lets say "AddOne(NumberToAdd) AS LONG" and I load the library and get the function then how do I call "AddOne(NumberToAdd) AS LONG" without resorting to what PB makes easy for me?
Reason I ask is documentation in other languages show loadlibrary, and if lucky if GetProcess....but Danged if they show you how to call if (Only PB shows a possible way, but even there the examples I see are PB built functions and not a generic (maybe API way) so I thought I would ask if anyone can solve my complete confusion


Anyways, maybe not the best forum (but probably the BEST since I know the reputations of many of you out there)

I am revisiting code of my past, and planning for the future (mostly fixing "mistakes" I made then that now I think my coding "Style" would best taking what I had and apply what I know now

In the realm of me making a DLL (created in PB) and distribute to users of multiple languages (VB, C, Labview, .Net, Java, OOK, Matlab, LabWindows...and etc) I am looking to compile once, distribute many times sort of thing, so I do not really care the language, just that my code works.
(Bonus Points for those of you that know what language "Ook" is

Anyways, PB allows you to LoadLibrary and GetProcAddress and Call DWORD to allow you to Load the Dll, then get the address of the function you wish to call, and then a way to call the function. (in this way you can KNOW that all parts exist, and not crash out because you had a missing peice of the puzzle)
Now my question is "How the HECK do you do it in another language????" (Most popular would be in VB for us "VB-Refugee" types)
API? Compiler? some trick that I do not know of??? (I am looking for generics here, so probably API is the common link)
Right now my only idea is "CallWindowProc" but I think that only calls the window process (or callback) so I would need to add code there to allow the user to call the function I need????
Is there a way to get the function and just call it if I know what the format of the function is????
aka lets say "AddOne(NumberToAdd) AS LONG" and I load the library and get the function then how do I call "AddOne(NumberToAdd) AS LONG" without resorting to what PB makes easy for me?
Reason I ask is documentation in other languages show loadlibrary, and if lucky if GetProcess....but Danged if they show you how to call if (Only PB shows a possible way, but even there the examples I see are PB built functions and not a generic (maybe API way) so I thought I would ask if anyone can solve my complete confusion


Comment