473,486 Members | 2,424 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CeRapiInvoke

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
Nov 17 '05 #1
2 1948
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

"Chuong" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
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

Nov 17 '05 #2
Hi Doug,

Thanks for the pointer! Will do what you suggested.

Chuong
-----Original Message-----
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 thestandard CeRapiInvoke signature:

extern "C" HRESULT __declspec(dllexport) __stdcall MyFunction(DWORDp_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 incorporateany parameters and results into the standard signature. This can either bedone via the p_pInput and p_ppOutput parameters or if there is a largeramount of data involved via p_pRAPIStream (or both if you want). See thedocs for details about memory allocation etc. Bear in mind that the CE sideis UNICODE.

Cheers

Doug Forster

"Chuong" <an*******@discussions.microsoft.com> wrote in messagenews:03****************************@phx.gbl...
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

.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.