>hi ,
>i am suresh from india .
>I want to know the steps for porting the 16-bit dll to 32-bit.
>Existing 16-bit dll was created on windows 3.1 and visual basic 4.0.
>i have to use the dll in the 32-bit environment and it should support for the 16-bit also.
>please let me know the easiest and reliable and accurate way about how to do this.
>i need the solution in visual basic or visual c++.
>i want to implement it for all the windows platforms..like from windows 3.1 onwards to windows 2000.
>
>observation:
>when i am trying to call the dll by declaring the API's.i am getting the error like "File is not Loaded" etc..
Your best bet is to port the code to VB 6 and create an equivalent COM control to use in the 32 bit environments; unfortunately, your specification of supporting Win3.x prevents you from a clean solution, because Win3.x, even with the Win32S extension, doesn't support an OLE-style interface, and trying to interface a 16-bit DLL to a 32 bit environment involves a fair amount of overhead to thunk the call and pass the return values.
I don't believe that VB4 is still a supported platform at this time, and the runtime has changed considerably. VB 6 is far more capable, but it can't export a C-style DLL interface.
An alternative would be to port the code to VC++, and create both 16-bit and 32-bit versions of the DLL; you'd then rely on an installer app to determine which one was appropriate to install on the target system.
BTW, Win3.x is no longer a supported platform, either.
>
>Please send me the solution As Soon As Possible..
>Thanks in Advance.
>suresh