how to used unmanaged class library on a C# web application

31/01/2005 - 05:27 por david chang | Informe spam
Hi, guys

I am trapped into a big trouble on how to use unmanaged class library
code in a C# web application.

Now, I am working on a project to develop a web interface for SPlus, a
statistical software tool. By intuitive, I plan to apply C# to develop
web side, which will invoke some unmanaged code to use functions of
SPlus. I have developed a unmanaged C++ class UM_A to use SPlus
functions, and also developed a wrapped managed C ++ class M_A for that
unmanaged class UM_A, and used managed M_A in the C# application.

First, I tried those unmanaged and managed classes in a window-based C#
application, they are really working, and then, I move them to web
application. They are failed. The failure is related to an exception of
"FileNotFoundException", suggesting that
File or assembly name M_A, or one of its dependencies was not found.

I am very puzzled. Could you guys tell me what is going on? I know that
C# web application can use Pinvoke c to reuse window DLL, and Marshaling
to visit COM. But can it reuse old class library by way of wrapped
managed class, and how to do?
I read many articles on how to utilize wrapped managed class for the
reuse of unmanaged class library, but all of them are related to windows
application.

Thanks

david



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Leer las respuestas

#1 Angel J. Hernández M.
31/01/2005 - 20:36 | Informe spam
Hi there,

PInvoke can help you out with this. If those SPlus
functions are in a DLL (Exported) you can call it from C#
without having to write "any class". Just declare the
exported functions (prototype) from within your class and
invoke them. Hope this may help you,

Regards,

Angel J. Hernández M.
MCP - MCAD - MCSD - MCDBA
http://groups.msn.com/desarrolladoresmiranda
http://ajhsis.net


Hi, guys

I am trapped into a big trouble on how to use unmanaged


class library
code in a C# web application.

Now, I am working on a project to develop a web


interface for SPlus, a
statistical software tool. By intuitive, I plan to


apply C# to develop
web side, which will invoke some unmanaged code to use


functions of
SPlus. I have developed a unmanaged C++ class UM_A to


use SPlus
functions, and also developed a wrapped managed C ++


class M_A for that
unmanaged class UM_A, and used managed M_A in the C#


application.

First, I tried those unmanaged and managed classes in a


window-based C#
application, they are really working, and then, I move


them to web
application. They are failed. The failure is related to


an exception of
"FileNotFoundException", suggesting that
File or assembly name M_A, or one of its dependencies


was not found.

I am very puzzled. Could you guys tell me what is going


on? I know that
C# web application can use Pinvoke c to reuse window


DLL, and Marshaling
to visit COM. But can it reuse old class library by way


of wrapped
managed class, and how to do?
I read many articles on how to utilize wrapped managed


class for the
reuse of unmanaged class library, but all of them are


related to windows
application.

Thanks

david



*** Sent via Developersdex http://www.developersdex.com


***
Don't just participate in USENET...get rewarded for it!
.

Preguntas similares