CeRapiInvoke

  • Thread starter Thread starter Chuong
  • Start date Start date
C

Chuong

Hi everyone, please help!

Our customer developed a WinCE DLL which contains a
function such as

bool fx(TCHAR* szName)

Obviously, szName is used the input/output. The return
bool is just to indicate pass or fail.

My question is how to use CeRapiInvoke to invoke this
function? All examples that I can find only show how to
invoke functions WITHOUT input parameters. Appreciate
and TIA all the helps!

Chuong
 
Hi Chuong,

You cannot call your customers dll directly from the desktop.

You need to write an intermediary WinCE dll with an entry point having the
standard CeRapiInvoke signature:

extern "C" HRESULT __declspec(dllexport) __stdcall MyFunction(DWORD
p_cbInput, BYTE* p_pInput, DWORD* p_pcbOutput, BYTE** p_ppOutput,
IRAPIStream* p_pRAPIStream )

That dll then can then call your customers dll. You will need to incorporate
any parameters and results into the standard signature. This can either be
done via the p_pInput and p_ppOutput parameters or if there is a larger
amount of data involved via p_pRAPIStream (or both if you want). See the
docs for details about memory allocation etc. Bear in mind that the CE side
is UNICODE.

Cheers

Doug Forster
 
Back
Top