|
"_$h@nky_" wrote: Please tell me how can i release memory of my mobile device.
All of the memory used by the process should be released once the application has exited. The process remains until all threads and all handles to the process and its threads are closed. I see that you are closing the handles.
For debugging purposes I would add a call to CeGlobalMemoryStatus[^] after each process creation so you can monitor the usage.
You can possibly call SHCloseApps[^] to have the device release additional memory.
Best Wishes,
-David Delaune
|
|
|
|
|
Randor wrote: You can possibly call SHCloseApps[^] to have the device release additional memory.
for SHCloseApps function need to add aygshell.h or aygshell.lib,where i can find those files.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
I m adding aygshell.h and after using SHCloseApps function but one error occured.
error LNK2019: unresolved external symbol _SHCloseApps referenced in function "public: void __thiscall CTestDlg::Test_Func(void)" (?Test_Func@CTestDlg@@QAEXXZ)
CTestDlg::Test_Func(void)
{
PROCESS_INFORMATION pi;
CString CMDdata;
MEMORYSTATUS MemStats;
MemStats.dwLength = sizeof(MEMORYSTATUS);
USES_CONVERSION;
if (!CeCreateProcess(
L"Test.exe",
T2CW((LPCTSTR)CMDdata),
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
NULL,
&pi))
{
CeGlobalMemoryStatus((LPMEMORYSTATUS) &MemStats);
if (MemStats.dwAvailPhys < MIN_MEMORY_TO_RUN)
{
if (!SHCloseApps(MIN_MEMORY_TO_RUN))
{
AfxMessageBox("Not free memory");
}
else
{
AfxMessageBox("free memory");
}
}
CeRapiUninit();
}
else
{
CeCloseHandle( pi.hProcess);
CeCloseHandle( pi.hThread);
}
}
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: error LNK2019: unresolved external symbol _SHCloseApps referenced in function "public: void __thiscall CTestDlg::Test_Func(void)" (?Test_Func@CTestDlg@@QAEXXZ)
The AYGShell Functions[^] require you to link with the aygshell library.
#pragma comment(lib, "aygshell.lib")
Best Wishes,
-David Delaune
|
|
|
|
|
I m also try this,even i add lib file from Project property page like
To add .lib files as linker input in the development environment
Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
Click the Linker folder.
Click the Input property page.
Modify the Additional Dependencies property.
but the error is still exists.
please help me for this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hey everybody!
I'm looking for a way to get the motherboard's serial number WITHOUT WMI.
I just can't find it an example code anywhere!
Thx a lot!
|
|
|
|
|
You will essentially need to parse the SMBIOS[^] tables and search for an OEM string (Type 11) as described in the System Management BIOS (SMBIOS) Specification[^] documents.
There is an example of how to read the SMBIOS table here on codeproject:
SMBIOS Peek[^]
This is essentially what WMI is doing at the lower levels to obtain this information.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi ,
I have a VC++ application which is build on Visual studio 2003. I have added couple of dialog boxes in it. In one of my dialog box i have added EditBox control,check box control etc. In the properties page of those controls I can see the TabStop property but no TabIndex is there. Can any one help me how to change the tabindex for those controls.
Thanks in advance....
birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
Do you mean tab order? To set the tab order, go to Format->Tab Order while in the dialog editor.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Thank you very much.
But still i am running in to another problem. In that dialog Box i have a tab control and four buttons lets say B1,B2,B3,B4. And in that tab control I have 2 check boxes lets say C1,C2.
I am tring to make the tab order in the following format :Tab->C1->C2->B1->B2->B3->B4.
but currently it is only possible to do Tab->B1->B2->B3->B4->C1->C2.
birajendu
CyberG India
Delhi
India
|
|
|
|
|
Press Ctrl+D and then you can set tab order for your control by click on numbers.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Thank you very much
birajendu
CyberG India
Delhi
India
|
|
|
|
|
I want my SDI application to get maximized as i run it, without clicking the miximized button.Please anyone help to solve this issu.
kkkljj
|
|
|
|
|
See ShowWindow()[^] API.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Thanks u for helping me resolving the issue.
kkkljj
|
|
|
|
|
hello all,
void *p is structure data and i need to split and copy them to another array.
After 3 byte i need to copy them to other array as i need to send them on tcp socket.
void dumpHex ( void *p, size_t size )
{
//int *list = malloc(n* sizeof(int));
unsigned char *bytes = (unsigned char *)p;
for (size_t i = 0 ; i < size ; i++ )
{
unsigned int b = bytes[i];
if (b>3)
{
printf(" i=%d 0x%02x \n",i,(char*)bytes[i]);
}
}
}
regards
Jalsa
|
|
|
|
|
jalsa G wrote: After 3 byte i need to copy them to other array as i need to send them on tcp socket.
Why? cannot you send the bytes directy?
And...Uhm...What is your question?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hi sir,
Thanks for the reply
i am sending data over tcp socket so before sending i need to recalculate tcp checksum using md5.
so the structure data has to be split and divided header and data separately.
header is consist of 38 bytes and other data is message data.
so i am trying to split the structure data using below code
#include "stdafx.h"
#include <string.h>
#include <malloc.h>
struct Test
{
int sno;
char name[24];
int rno;
} testexmp;
unsigned long int x;
void dumpHex ( void *p, size_t size )
{
//int *list = malloc(n* sizeof(int));
unsigned char *bytes = (unsigned char *)p;
for (size_t i = 0 ; i < size ; i++ )
{
unsigned int b = bytes[i];
if (b>3)
{
printf(" i=%d 0x%02x \n",i,(char*)bytes[i]);
}
}
}
int main(int argc, char* argv[])
{
printf("size of the test structure is %d \n",sizeof(testexmp));
testexmp.sno=1;
strcpy(testexmp.name,"testsample");
testexmp.rno=10;
//here i split the data but i am unable to store them into other array
dumpHex(&testexmp,sizeof(testexmp));
printf("sno is %d \n",testexmp.sno);
printf("name is %s \n",testexmp.name);
printf("roll no is %d \n",testexmp.sno);
return 0;
}
Jalsa
|
|
|
|
|
jalsa G wrote: i am sending data over tcp socket so before sending i need to recalculate tcp checksum using md5.
Why ? Everything is handled internally so the only thing you have to do is send your structure. Just pass the address of the structure instance to the send function and specify sizeof(Test) as the lenght of the data.
|
|
|
|
|
Hello Cedric,
Everything is handled internally,but the server which receives my data has packet structure format.
so before sending i need to recalculate the packet.
Jalsa
|
|
|
|
|
Hi All,
I am using the API 'MultiByteToWideChar' for converting the ASCII char buffer to unicode. This fails indefinitely on Windows Vista french OS. The API returns the number of characters converted.
Below is the actual text: 'Carte réseau'
After calling the API, the text returned is something like this: Carte r?seau
Please provide your inputs on this.
Thanks for your time.
Regards
Sunil
|
|
|
|
|
BTW, forgot to mention, below are the parameters to the API:
char Description[132] = {0};
char Description[132] = {0};
TCHAR szName[132] = {0};
.
.
.
.
int nLen = MultiByteToWideChar(CP_UTF8, 0, Description, -1, szName, SIZEOF_ARRAY(szName));
// nLen is around 30, the no. of chars copied
Sunil
|
|
|
|
|
This API works fine.
The problem is your machine language may be set to English.
So first set the machine language to French.
Go to Control Panel->Regional and Language options
In both "Regional Options" and "Advanced" tabs selct Frech language.
It will ask you to reboot the machine.
Reboot it and check now.
It will work fine.
Cheers,
Sujeet Pandurang Kumbhar.
modified on Monday, May 25, 2009 2:20 AM
|
|
|
|
|
"é" is an ANSI character (code page 1252), but doesn't have a single character representation in UTF-8.
Please remove your answer because it is 100% wrong.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thanks Sujeet.
But as you said my system language is already set to French. Not sure why the problem still exists.
Could you think of anything else ?
Thanks
Sunil
|
|
|
|