dotnet compact framework:
The last is likely becuae it's bringing in MFC, which you have no need for - don't use it. -- Chris Tacke, Embedded MVP OpenNETCF Consulting Managed Code in an Embedded World www.OpenNETCF.com [quoted text, click to view] "James Hetfield" <james@hetfield.com> wrote in message news:%235Vh6cS0HHA.2484@TK2MSFTNGP06.phx.gbl... > Hello > > I'm new to C++. > > I am trying to create a setup.dll in VS 2005. The samples in the SDK didnt > work for me: > => removed the CAB-Project in it, then tried to build the DLL, I got: > 1>------ Skipped Build: Project: SetupDLL ------ > 1> > ========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped > ========== > > I dont know why, tried from Smartphone WM 5 and PPC WM 5... the same... > > So I have created an own project: > > 1. New Project = > Visual C++ => Smart Device => MFC Smart Device DLL > 2. then I proceed like this here: > http://www.pocketpcdn.com/articles/setupdll.html > 3. I added in the codeINSTALL_EXIT-Section: > between AFX_MANAGE_STATE(AfxGetStaticModuleState()); > and > return codeINSTALL_EXIT_DONE; > the following: > PROCESS_INFORMATION pi = {0}; > CreateProcess(TEXT("\\My Documents\\myapp.exe"), TEXT(""), NULL, NULL, > NULL, 0, NULL, NULL, NULL, &pi); > > This is working! But: The DLL is 361KB big (!) > > Why is this? What have I done wrong? > > Thanks > > James
Hello I'm new to C++. I am trying to create a setup.dll in VS 2005. The samples in the SDK didnt work for me: => removed the CAB-Project in it, then tried to build the DLL, I got: 1>------ Skipped Build: Project: SetupDLL ------ 1> ========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped ========== I dont know why, tried from Smartphone WM 5 and PPC WM 5... the same... So I have created an own project: 1. New Project = > Visual C++ => Smart Device => MFC Smart Device DLL 2. then I proceed like this here: http://www.pocketpcdn.com/articles/setupdll.html 3. I added in the codeINSTALL_EXIT-Section: between AFX_MANAGE_STATE(AfxGetStaticModuleState()); and return codeINSTALL_EXIT_DONE; the following: PROCESS_INFORMATION pi = {0}; CreateProcess(TEXT("\\My Documents\\myapp.exe"), TEXT(""), NULL, NULL, NULL, 0, NULL, NULL, NULL, &pi); This is working! But: The DLL is 361KB big (!) Why is this? What have I done wrong? Thanks James
Hi James, As Chris mentioned, the filesize got big coz the project uses MFC. If you statically link MFC it might even be bigger. I found another step by step example for creating a CE Setup DLL that just uses pure Win32 Here's the link: http://support.installshield.com/kb/view.asp?articleid=Q104092 -- Regards, Christian Resma Helle http://christian-helle.blogspot.com [quoted text, click to view] "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message news:%2379wP2T0HHA.5764@TK2MSFTNGP03.phx.gbl... > The last is likely becuae it's bringing in MFC, which you have no need > for - don't use it. > > > -- > > Chris Tacke, Embedded MVP > OpenNETCF Consulting > Managed Code in an Embedded World > www.OpenNETCF.com > > > "James Hetfield" <james@hetfield.com> wrote in message > news:%235Vh6cS0HHA.2484@TK2MSFTNGP06.phx.gbl... >> Hello >> >> I'm new to C++. >> >> I am trying to create a setup.dll in VS 2005. The samples in the SDK >> didnt work for me: >> => removed the CAB-Project in it, then tried to build the DLL, I got: >> 1>------ Skipped Build: Project: SetupDLL ------ >> 1> >> ========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped >> ========== >> >> I dont know why, tried from Smartphone WM 5 and PPC WM 5... the same... >> >> So I have created an own project: >> >> 1. New Project = > Visual C++ => Smart Device => MFC Smart Device DLL >> 2. then I proceed like this here: >> http://www.pocketpcdn.com/articles/setupdll.html >> 3. I added in the codeINSTALL_EXIT-Section: >> between AFX_MANAGE_STATE(AfxGetStaticModuleState()); >> and >> return codeINSTALL_EXIT_DONE; >> the following: >> PROCESS_INFORMATION pi = {0}; >> CreateProcess(TEXT("\\My Documents\\myapp.exe"), TEXT(""), NULL, NULL, >> NULL, 0, NULL, NULL, NULL, &pi); >> >> This is working! But: The DLL is 361KB big (!) >> >> Why is this? What have I done wrong? >> >> Thanks >> >> James > >
Hi If I turn off Static Linked (set to dynamic), I can build it. but when I create the cab and install it, it just says "cannot install".... If I have static linked, it is working (but is big) I will try your link although it seems to be quite a lot to do for a total new-to-C++... Thanks "Christian Resma Helle" <xtianism@gmail.com> schrieb im Newsbeitrag news:E0C14CF5-3978-4949-9130-32C7BDC91AAB@microsoft.com... [quoted text, click to view] > Hi James, > > As Chris mentioned, the filesize got big coz the project uses MFC. If you > statically link MFC it might even be bigger. I found another step by step > example for creating a CE Setup DLL that just uses pure Win32 > > Here's the link: > http://support.installshield.com/kb/view.asp?articleid=Q104092 > > > -- > Regards, > Christian Resma Helle > http://christian-helle.blogspot.com > > > "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message > news:%2379wP2T0HHA.5764@TK2MSFTNGP03.phx.gbl... >> The last is likely becuae it's bringing in MFC, which you have no need >> for - don't use it. >> >> >> -- >> >> Chris Tacke, Embedded MVP >> OpenNETCF Consulting >> Managed Code in an Embedded World >> www.OpenNETCF.com >> >> >> "James Hetfield" <james@hetfield.com> wrote in message >> news:%235Vh6cS0HHA.2484@TK2MSFTNGP06.phx.gbl... >>> Hello >>> >>> I'm new to C++. >>> >>> I am trying to create a setup.dll in VS 2005. The samples in the SDK >>> didnt work for me: >>> => removed the CAB-Project in it, then tried to build the DLL, I got: >>> 1>------ Skipped Build: Project: SetupDLL ------ >>> 1> >>> ========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped >>> ========== >>> >>> I dont know why, tried from Smartphone WM 5 and PPC WM 5... the same... >>> >>> So I have created an own project: >>> >>> 1. New Project = > Visual C++ => Smart Device => MFC Smart Device DLL >>> 2. then I proceed like this here: >>> http://www.pocketpcdn.com/articles/setupdll.html >>> 3. I added in the codeINSTALL_EXIT-Section: >>> between AFX_MANAGE_STATE(AfxGetStaticModuleState()); >>> and >>> return codeINSTALL_EXIT_DONE; >>> the following: >>> PROCESS_INFORMATION pi = {0}; >>> CreateProcess(TEXT("\\My Documents\\myapp.exe"), TEXT(""), NULL, NULL, >>> NULL, 0, NULL, NULL, NULL, &pi); >>> >>> This is working! But: The DLL is 361KB big (!) >>> >>> Why is this? What have I done wrong? >>> >>> Thanks >>> >>> James >> >> >
Hi Chris Thanks, but how can I turn it off? I tried to using dynamic link to it, it is building well, but when I then install my cab, it just says taht installation failed... if I have static link, then it is working... Thanks "<ctacke/>" <ctacke[at]opennetcf[dot]com> schrieb im Newsbeitrag news:%2379wP2T0HHA.5764@TK2MSFTNGP03.phx.gbl... [quoted text, click to view] > The last is likely becuae it's bringing in MFC, which you have no need > for - don't use it. > > > -- > > Chris Tacke, Embedded MVP > OpenNETCF Consulting > Managed Code in an Embedded World > www.OpenNETCF.com > > > "James Hetfield" <james@hetfield.com> wrote in message > news:%235Vh6cS0HHA.2484@TK2MSFTNGP06.phx.gbl... >> Hello >> >> I'm new to C++. >> >> I am trying to create a setup.dll in VS 2005. The samples in the SDK >> didnt work for me: >> => removed the CAB-Project in it, then tried to build the DLL, I got: >> 1>------ Skipped Build: Project: SetupDLL ------ >> 1> >> ========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped >> ========== >> >> I dont know why, tried from Smartphone WM 5 and PPC WM 5... the same... >> >> So I have created an own project: >> >> 1. New Project = > Visual C++ => Smart Device => MFC Smart Device DLL >> 2. then I proceed like this here: >> http://www.pocketpcdn.com/articles/setupdll.html >> 3. I added in the codeINSTALL_EXIT-Section: >> between AFX_MANAGE_STATE(AfxGetStaticModuleState()); >> and >> return codeINSTALL_EXIT_DONE; >> the following: >> PROCESS_INFORMATION pi = {0}; >> CreateProcess(TEXT("\\My Documents\\myapp.exe"), TEXT(""), NULL, NULL, >> NULL, 0, NULL, NULL, NULL, &pi); >> >> This is working! But: The DLL is 361KB big (!) >> >> Why is this? What have I done wrong? >> >> Thanks >> >> James > >
I have now downloaded eVC++ 4 (+SP4), and created a dll exactly as described in the link http://www.pocketpcdn.com/articles/setupdll.html It did build, only 7.5KB, but when I am trying to install it, it failes... I'm quite sure that my cab settings are ok, because if I use the big file with MFC, then it is working... "<ctacke/>" <ctacke[at]opennetcf[dot]com> schrieb im Newsbeitrag news:%2379wP2T0HHA.5764@TK2MSFTNGP03.phx.gbl... [quoted text, click to view] > The last is likely becuae it's bringing in MFC, which you have no need > for - don't use it. > > > -- > > Chris Tacke, Embedded MVP > OpenNETCF Consulting > Managed Code in an Embedded World > www.OpenNETCF.com > > > "James Hetfield" <james@hetfield.com> wrote in message > news:%235Vh6cS0HHA.2484@TK2MSFTNGP06.phx.gbl... >> Hello >> >> I'm new to C++. >> >> I am trying to create a setup.dll in VS 2005. The samples in the SDK >> didnt work for me: >> => removed the CAB-Project in it, then tried to build the DLL, I got: >> 1>------ Skipped Build: Project: SetupDLL ------ >> 1> >> ========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped >> ========== >> >> I dont know why, tried from Smartphone WM 5 and PPC WM 5... the same... >> >> So I have created an own project: >> >> 1. New Project = > Visual C++ => Smart Device => MFC Smart Device DLL >> 2. then I proceed like this here: >> http://www.pocketpcdn.com/articles/setupdll.html >> 3. I added in the codeINSTALL_EXIT-Section: >> between AFX_MANAGE_STATE(AfxGetStaticModuleState()); >> and >> return codeINSTALL_EXIT_DONE; >> the following: >> PROCESS_INFORMATION pi = {0}; >> CreateProcess(TEXT("\\My Documents\\myapp.exe"), TEXT(""), NULL, NULL, >> NULL, 0, NULL, NULL, NULL, &pi); >> >> This is working! But: The DLL is 361KB big (!) >> >> Why is this? What have I done wrong? >> >> Thanks >> >> James > >
I have developed a dll in c++ in order New Project = > Visual C++ => Smart Device => MFC Smart Device DLL. This th content of dll: File Type: DLL Section contains the following exports for LibWrapper.dll 00000000 characteristics 46B19F6E time date stamp Thu Aug 02 11:10:06 2007 0.00 version 1 ordinal base 10 number of functions 10 number of names ordinal hint RVA name 5 0 000011E4 createOutputStream = ?createOutputStream@@YA_NPAD00@Z (bool __cdecl createOutputStream(char *,char *,char *)) 2 1 000010E4 create_stream = ?create_stream@@YAHPBUpjmedia_codec_info@@W4pjmedia_dir@@GPBUpj_sockaddr_in@@PAPAUpjmedia_stream@@@Z (int __cdecl create_stream(struct pjmedia_codec_info const *,enum pjmedia_dir,unsigned short,struct pj_sockaddr_in const *,struct pjmedia_stream * *)) 9 2 000012B0 deinit_codecs = ?deinit_codecs@@YAHXZ (int __cdecl deinit_codecs(void)) 8 3 000013C0 destroy = ?destroy@@YAXXZ (void __cdecl destroy(void)) 1 4 00001068 init_codecs = ?init_codecs@@YAHXZ (int __cdecl init_codecs(void)) 7 5 00001010 init_pj = ?init_pj@@YAXHPADH@Z (void __cdecl init_pj(int,char *,int)) 3 6 0000129C setLocalPort = ?setLocalPort@@YAXH@Z (void __cdecl setLocalPort(int)) 6 7 000013E0 start = ?start@@YAPADXZ (char * __cdecl start(void)) 4 8 0000130C stop = ?stop@@YA_NXZ (bool __cdecl stop(void)) 10 9 00001294 summ = ?summ@@YAHHH@Z (int __cdecl summ(int,int)) Summary 18000 .data 3000 .pdata 12000 .rdata 3000 .reloc 1000 .rsrc 76000 .text Now I want use this library in C#, but when I invoke this function [DllImport("LibWrapper.dll")] public static extern int summ(int i , int b); .... public DllWrapper() { .... int result =summ(1, 2); .... } The emulator throw this exception : System.MissingMethodException was unhandled Message="Can't find PInvoke DLL 'LibWrapper.dll'." StackTrace: at MyPrimaApp.DllWrapper..ctor() at MyPrimaApp.Program.Main() I have tryed to copy the LiWrapper.dll everywhere in the project, but no change. Please Help me. EggHeadCafe.com - .NET Developer Portal of Choice
Are you sure that the DLL is copied to the device? -- Regards, Christian Resma Helle http://christian-helle.blogspot.com [quoted text, click to view] <Pasquale> wrote in message news:2007827226calius25@hotmail.com... >I have developed a dll in c++ in order New Project = > Visual C++ => Smart >Device => MFC Smart Device DLL. > This th content of dll: > > > File Type: DLL > > Section contains the following exports for LibWrapper.dll > > 00000000 characteristics > 46B19F6E time date stamp Thu Aug 02 11:10:06 2007 > 0.00 version > 1 ordinal base > 10 number of functions > 10 number of names > > ordinal hint RVA name > > 5 0 000011E4 createOutputStream = > ?createOutputStream@@YA_NPAD00@Z (bool __cdecl createOutputStream(char > *,char *,char *)) > 2 1 000010E4 create_stream = > ?create_stream@@YAHPBUpjmedia_codec_info@@W4pjmedia_dir@@GPBUpj_sockaddr_in@@PAPAUpjmedia_stream@@@Z > (int __cdecl create_stream(struct pjmedia_codec_info const *,enum > pjmedia_dir,unsigned short,struct pj_sockaddr_in const *,struct > pjmedia_stream * *)) > 9 2 000012B0 deinit_codecs = ?deinit_codecs@@YAHXZ (int > __cdecl deinit_codecs(void)) > 8 3 000013C0 destroy = ?destroy@@YAXXZ (void __cdecl > destroy(void)) > 1 4 00001068 init_codecs = ?init_codecs@@YAHXZ (int __cdecl > init_codecs(void)) > 7 5 00001010 init_pj = ?init_pj@@YAXHPADH@Z (void __cdecl > init_pj(int,char *,int)) > 3 6 0000129C setLocalPort = ?setLocalPort@@YAXH@Z (void > __cdecl setLocalPort(int)) > 6 7 000013E0 start = ?start@@YAPADXZ (char * __cdecl > start(void)) > 4 8 0000130C stop = ?stop@@YA_NXZ (bool __cdecl stop(void)) > 10 9 00001294 summ = ?summ@@YAHHH@Z (int __cdecl summ(int,int)) > > Summary > > 18000 .data > 3000 .pdata > 12000 .rdata > 3000 .reloc > 1000 .rsrc > 76000 .text > > > > > Now I want use this library in C#, but when I invoke this function > > [DllImport("LibWrapper.dll")] > public static extern int summ(int i , int b); > ... > public DllWrapper() > { > ... > int result =summ(1, 2); > ... > } > > The emulator throw this exception : > > System.MissingMethodException was unhandled > Message="Can't find PInvoke DLL 'LibWrapper.dll'." > StackTrace: > at MyPrimaApp.DllWrapper..ctor() > at MyPrimaApp.Program.Main() > > I have tryed to copy the LiWrapper.dll everywhere in the project, but no > change. > > > Please Help me. > > > > EggHeadCafe.com - .NET Developer Portal of Choice > http://www.eggheadcafe.com
Hi James, My guess is that you are still starting with an MFC Project. If you are starting out with an MFC Project, then your installer will require MFC. If MFC is included on the device you are trying to install on, then you can use the smaller build (doesn't wrap MFC into the file). Since your executable is failing, I would guess your device does not include MFC. So, to take advantage of MFC, you will need to include it. If you do not want to use MFC, you are going to have to create a project *without* MFC. You said you are new to C++, so you may not want to go this route because there will be several other steps to create your program when you start with a "non-MFC" project. Hope this helps, ~Joe [quoted text, click to view] "James Hetfield" wrote: >I have now downloaded eVC++ 4 (+SP4), and created a dll exactly as >described in the link > http://www.pocketpcdn.com/articles/setupdll.html > > It did build, only 7.5KB, but when I am trying to install it, it failes... > I'm quite sure that my cab settings are ok, because if I use the big file > with MFC, then it is working... > >>> Hello >>> >>> I'm new to C++. >>> >>> I am trying to create a setup.dll in VS 2005. The samples in the SDK >>> didnt work for me: >>> => removed the CAB-Project in it, then tried to build the DLL, I got: >>> 1>------ Skipped Build: Project: SetupDLL ------ >>> 1> >>> ========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped >>> ========== >>> >>> I dont know why, tried from Smartphone WM 5 and PPC WM 5... the same... >>> >>> So I have created an own project: >>> >>> 1. New Project = > Visual C++ => Smart Device => MFC Smart Device DLL >>> 2. then I proceed like this here: >>> http://www.pocketpcdn.com/articles/setupdll.html >>> 3. I added in the codeINSTALL_EXIT-Section: >>> between AFX_MANAGE_STATE(AfxGetStaticModuleState()); >>> and >>> return codeINSTALL_EXIT_DONE; >>> the following: >>> PROCESS_INFORMATION pi = {0}; >>> CreateProcess(TEXT("\\My Documents\\myapp.exe"), TEXT(""), NULL, NULL, >>> NULL, 0, NULL, NULL, NULL, &pi); >>> >>> This is working! But: The DLL is 361KB big (!) >>> >>> Why is this? What have I done wrong? >>> >>> Thanks >>> >>> James >> >> >
Don't see what you're looking for? Try a search.
|