fail to buil a cab file

G

gil

hi,

i am trying to use unmanaged imported function in my pocket pc smart
device c# application, but i can't seem to automatically create a cab
file and i belive that is the reason for the run time error i get:
"Can't find PInvoke DLL 'CFC_Org.dll'." the unmanaged code is written
in evc++4.0.

my c# application is defined as:

Visual C# -> Smart device -> Windows CE 5.0 -> Device application

according to a Walkthrough on the subject ("Walkthrough: Generating
Custom CAB files for Device Projects") i am supposed to have an option
of "build cab file", but i don't. no .cab or .inf file is created.

if anyone knows where i can find the option to create a cab file, or
how to solve the PInvoke problem... i would be very gratefull

thanks,

gil
 
G

gil

thanks a lot!! i finally managed to create a cab file.

but now i have another problem.the runtime error "Can't find PInvoke
DLL 'CFC_Org.dll'" did not disappear.

what i'm trying to do is:

i have a simple c# solution (VS 2005), and i add to it a main project
in c# and another project in c++ (Other Languages->C++->Smart
Device->MFC Smart Device DLL). this project contains only a simple .cpp
with one exported function:


#ifndef CCOM_EXPORT
#define DllImpExp __declspec( dllexport )
#else
#define DllImpExp __declspec( dllimport )
#endif


extern "C" int PASCAL EXPORT messss()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return 111;
}

in my C# project i import this function:

[DllImport("MfCsmartDevDll.dll", EntryPoint = "messss")]
public static extern int messss();


to my cab file i added the c# project as main application and added the
DLL created by compiling the C++ project (Add->File..)


Why doesn't it find the DLL ("Can't find PInvoke DLL 'CFC_Org.dll')????

maybe i shouldn't define the c++ project as MFC SmartDevice Dll? or
maybe i need to prepare a cab file for the c++ project separately?

waiting for your help (with despair...)

thanks again,

gil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top