We help IT Professionals succeed at work.

Making an API call to Kernel32.dll file from an ASP page.

rlall asked
Medium Priority
Last Modified: 2008-03-06
I am working on an ASP application which tries to open .tif image files dynamically from an ASP page. These image files live on an NT server in our network as .tif images. What I try to use is a VB Script function to make API calls to Kernel32.dll file (in the WINNT/SYTEM32 directory) that will open a Image Viewing software and the name of the software is : wangimg.exe. I have tried this in a VB application and it works fine. Is it possible to make such API calls from an ASP page? If yes then I would like to know how that can be done. Thanks for your response in advance.
Watch Question

I doubt it -- you would have to call the app on the client, not the server, and you can't. If you can convert the TIF to jpg, then it would display fine. Otherwise, you'd need some kind of plug-in/converter on the client, and it would need to be tied to the browser in some way -- and none of that is possible from a server side scripting language.
Not directly.  You need to create an ActiveX DLL in VB that makes that API calls, and call that component from your ASP page.


Thanks for your explanation. This helps.


This comment is meant for the response from Expert AzraSound: I think that is the solution I am going to try to work on. I have already written an ActiveX dll in VB to solve this problem but am having problems creating the dll object using the server.CreateObject method in ASP. Thanks for your prompt response.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.