M
mjacu
Hello
I've got a problem using unmanaged dll in C++ on my website.
I'm using System.Runtime.InteropServices namespace and DllImport.
My dll allocate memory and generate some files using allocated memory.
Every request generate one file.
In global.asax in Application_Start I call function from dll allocating
memory. In Application_End I call function freeing memory.
My webform.Page_Load() call some functions from dll,
which operate on allocated memory.
Sometimes everything work fine, but sometimes I get
NullReferenceException when call dll function.
When I get NullReferenceException, next requests
generate this exception too.
I don't know, what is wrong.
Few months ago I have COM component doing the same work.
COM component use the same C++ source code.
Now I must do the same using dll/InteropServices.
Regards,
Jacek
I've got a problem using unmanaged dll in C++ on my website.
I'm using System.Runtime.InteropServices namespace and DllImport.
My dll allocate memory and generate some files using allocated memory.
Every request generate one file.
In global.asax in Application_Start I call function from dll allocating
memory. In Application_End I call function freeing memory.
My webform.Page_Load() call some functions from dll,
which operate on allocated memory.
Sometimes everything work fine, but sometimes I get
NullReferenceException when call dll function.
When I get NullReferenceException, next requests
generate this exception too.
I don't know, what is wrong.
Few months ago I have COM component doing the same work.
COM component use the same C++ source code.
Now I must do the same using dll/InteropServices.
Regards,
Jacek