OpenNETCF
(1)
CorBindToRuntimeEx
(1)
IsapiiDLL
(1)
Tacke
(1)
Efc7db91
(1)
Incomple
(1)
Pinvoke
(1)
Hickups
(1)
need to serve up data from a .NET APP in the Web Server
Asked By z
03-Feb-10 10:23 AM

Running windows CE 5.0 and .net 2.0.
I have a .net EXE. In it I have a single really large String I need to serve
up in a wb page. Currently I spit the string out into a file and let the user
surf right into it. Problem with this is that the string/file needs to get
refreshed with new data from the EXE. This solution works on the client side
after a few hickups on the incomple string/file (while the .net app is
finshing up writing the whole file.)
So this posting is to try to get a way to synchronize this operation for
better performance overall (make it more event driven)
I was wondering if I could use the method outlined in
http://support.microsoft.com/kb/953836 to call a method in my managed EXE
straight from my native ISAPI dll which involves using CorBindToRuntimeEx in
mscoree.h. Except I cant find mscoree.h in the windows ce 5 SDK to compile
against. Does anyone know how to get around this problem?
Is there another better way to pass my string fom managed cde into ASP that
someone can think of aside from a using a DB?
Can I export a function in my ISAPI dll that the managed exe can pinvoke
into to refresh the data in the dll that can then be served up on demand?
thanks in advance for any clues.
The CF does not have EE hosting, so abandon that thought completely.
Chris Tacke, MVP replied to z
03-Feb-10 03:25 PM
The CF does not have EE hosting, so abandon that thought completely. Why not
just use a memory-mapped file with a named event for synchronization?
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
Thanks. I will try this route next.I tried PInvoking my IsapiiDLL from my .
z replied to Chris Tacke, MVP
03-Feb-10 04:40 PM
Thanks. I will try this route next.
I tried PInvoking my IsapiiDLL from my .net EXE. It is not exceptioning or
anything,but the debugger in the .net EXE is almost like skipping the call to
the unmanaged ISAPI dll. Is this normal behavior?
I dont know why the debugger was not working before.
z replied to Chris Tacke, MVP
03-Feb-10 04:45 PM
I dont know why the debugger was not working before. My pinvokes into the
ISAP dll are working now. Can you see advantages of doing it the
memory-mapped file way instead of this pinvoke way?
The P/Invoke is one-way, and the managed code calling the P/Invoke will
Chris Tacke, MVP replied to z
03-Feb-10 06:33 PM
The P/Invoke is one-way, and the managed code calling the P/Invoke will have
different instance data that the one hosted by the web server engine.
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
ok; that was a futile event.
z replied to Chris Tacke, MVP
04-Feb-10 07:33 AM
ok; that was a futile event. I guess I really cant jump process spaces with a
dll. Appears the server loads its own dll and the .net exe loads a copy for
its own. I can attach natively to the one for my .net exe in that context
and to the web server one in the services.exe context. HTTPExtension requests
come into the services dll but not the .net exe's dll. My pinvokes from my
.net go into its own dll but not the services.exe's ISAPI dll. Back to memory
mapped files.
As far as that CorBindToRuntimeEx(I know you said it doesnt exist in CE), do
you know if it binds to an existing loaded exe/dll or does it always try to
start up a new instance in the process space of the unamanged caller?
good link for exploring IPC options in CE :http://msdn.microsoft.
z replied to z
04-Feb-10 10:15 AM
good link for exploring IPC options in CE :
http://msdn.microsoft.com/en-us/library/aa446520.aspx
It launches its own, so would similarly be of no use (if it existed).
Chris Tacke, MVP replied to z
05-Feb-10 06:30 PM
It launches its own, so would similarly be of no use (if it existed).
This might be of interest:
http://www.opennetcf.com/library/sdf/html/efc7db91-9586-acbb-212b-e28d298c49e8.htm
-Chris