windows mobile - MFC application / AfxOleInit / RAPI failure with RPC server is unavailable -


to implement copy , paste functionnality in mfc application, invoke afxoleinit() method.

we use rapi communicate windows mobile devices.

when afxoleinit not used, have no problems.

but afxoleinit executed, reproduce following sequence:

  • the mobile device in cradle , correctly connected via windows mobile device center (wmdc) pc, cerapiinitex , cerapiuninit complete successfully
  • we remove mobile cradle deconnects wmdc
  • we reput mobile in cradle and, second time, cerapiinitex , cerapiuninit complete successfully
  • we remove mobile cradle deconnects wmdc
  • at moment, message appears in "output" tab of visual studio: "the rpc server unavailable"
  • we reput mobile in cradle , time cerapiinitex fails return value "the rpc server unavailable"

we have tried put code contains calls rapi dll functions:

  • directly in mfc application,

  • in dll,

  • in activex

we reproduce error in cases.

note that, if code put in process launched via createprocess mfc application, there no errors.

you can download application reproduces error @ following address:http://iode-informatique.com/tests/winmob_mfc/rapi_test_app.zip

note if comment call afxoleinit, error doesn't occur.

best regards.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -