Prev: Connecting to WEP using opennetcf SDF2.2
Next: found a shell bug on WM 5 and 6.x w/ regard to the menu bar
From: Ender Karadağ on 2 Sep 2008 16:50 hi guys, im tryin to create a dll in C#.NET 2003 to be called from pc using rapi function CeRapiInvoke(). msdn documentation says that, the function in the dll can be called from the pc, but must have a constant prototype im using delphi in pc side, so pc side is ok, what i have trouble about is only the dll in the device have anyone created a dll for being invoked by CeRapiInvoke (or have knowledge about creating it) in c#.net? if yes, would u please post a piece of code here this is the constant prototype in msdn documentation int MyFunctionInTheDeviceDll(DWORD cbInput, BYTE* pInput, DWORD* pcbOutput, BYTE** ppOutput, IRAPIStream* pStream); so the function may look like int MyFunctionInTheDeviceDll(DWORD cbInput, BYTE* pInput, DWORD* pcbOutput, BYTE** ppOutput, IRAPIStream* pStream) { MessageBox.Show("I'am called from PC"); return 0; } corresponding c#.net code would be enough for me Regards, Ender Karadað
From: Chris Tacke, eMVP on 2 Sep 2008 16:55 Can't be done. The CF doesn't support hosting, so the DLL that CeRapiInvoke is going to call *must* be a native DLL written in plain old C. -- Chris Tacke, Embedded MVP OpenNETCF Consulting Giving back to the embedded community http://community.OpenNETCF.com "Ender Karada�" <enkaradag(a)gmail.com> wrote in message news:b2902d4f-c8ea-4055-a59e-308cc342fecf(a)59g2000hsb.googlegroups.com... hi guys, im tryin to create a dll in C#.NET 2003 to be called from pc using rapi function CeRapiInvoke(). msdn documentation says that, the function in the dll can be called from the pc, but must have a constant prototype im using delphi in pc side, so pc side is ok, what i have trouble about is only the dll in the device have anyone created a dll for being invoked by CeRapiInvoke (or have knowledge about creating it) in c#.net? if yes, would u please post a piece of code here this is the constant prototype in msdn documentation int MyFunctionInTheDeviceDll(DWORD cbInput, BYTE* pInput, DWORD* pcbOutput, BYTE** ppOutput, IRAPIStream* pStream); so the function may look like int MyFunctionInTheDeviceDll(DWORD cbInput, BYTE* pInput, DWORD* pcbOutput, BYTE** ppOutput, IRAPIStream* pStream) { MessageBox.Show("I'am called from PC"); return 0; } corresponding c#.net code would be enough for me Regards, Ender Karada�
From: Ender Karadağ on 2 Sep 2008 18:12 thanks chris, good to hear that, so ill stop that idea. ill code it in old c. but one more question, my purpose was accessing SDF (sqlce2.0) files and doing several jobs on database. so is it possible to access these sdf files in the device with old c? if yes, which compiler shall i use? thanks again Ender Karadag
From: Ender Karadağ on 3 Sep 2008 10:47 hi, ive tried microsoft embedded visual c++ 4.0. documentation says that rapi.h is there in one of the folders where eVC is installed. but i cant find it am i using the wrong compiler? as a start of work in eVC, ive created a "simple Hello World" winCe application in this compiler (that comes as an option when opening a new project). Changed nothing in the code, pasted the exe into the device (that is a Windows Mobile device). it crashes (with error message ".. is not a valid pocketpc application") only thing i need is, creating the dll that can be called using CeRapiInvoke (in block mode) and accessing SqlCe 2.0 please help me Ender
From: Chris Tacke, eMVP on 3 Sep 2008 11:37
IIRC it's in the C:\Program Files\Windows CE Tools somewhere in the ActiveSync stuff. -Chris "Ender Karadag" <enkaradag(a)gmail.com> wrote in message news:0aba5ed5-2901-4a0a-a558-ba7568bc2579(a)k13g2000hse.googlegroups.com... > hi, > > ive tried microsoft embedded visual c++ 4.0. documentation says that > rapi.h is there in one of the folders where eVC is installed. but i > cant find it > > am i using the wrong compiler? > > as a start of work in eVC, ive created a "simple Hello World" winCe > application in this compiler (that comes as an option when opening a > new project). Changed nothing in the code, pasted the exe into the > device (that is a Windows Mobile device). it crashes (with error > message ".. is not a valid pocketpc application") > > only thing i need is, creating the dll that can be called using > CeRapiInvoke (in block mode) and accessing SqlCe 2.0 > > please help me > > Ender |