|
Hi ,
Am working on EVC , i need to get some information of my device like
device name , device id,platform, net connection status ,power source,volume level through some WINCE API . i dont know which site to refer for the api names , please help me out in this .
Thanks in advance
|
|
|
|
|
Hello!
I have a major problem with my MFC-application:
My software (MFC, VS2005) experiences since some minor changes some weird crashes. The stragest thing is, that most crashes are
connected to one class, that keeps my configuration. But i don´t see anything, that might cause memory-leak or things like this.
Here is what happens:
- When assigning a config-object to another the programm crashes with "lock"
I did a workaroung for this by transfering this object by reference, so there is only the "master-copy" of the object, that is only linked to the other objects using the data inside this object.
- "Visual Leak Detector" delivers no memory-leak, but of course only if the app doesn´t crash
- when accessing an funtion from an DLL (C-Code) i get a access-violation
- an older (befor the changes) version is running perfectly
- when compiling as "release" i get different crashes than with "debug"
- when copying int-values from the config-object to an int i get 2^16-times the value (16bit left-shift of the value), e.g. 122 (1111010) becomes 7995392 (1111010 00000000 00000000)
What i guess is, that there´s something wrong with memory-management inside my app. But i have no idea where it could be!
Does anyone have any ideas how to find this problem?
Thanks a lot for helping!
J.
|
|
|
|
|
The first thing I would check is the arrays (such as char[]) (if you use arrays) for overflow.
In my experience, a one byte overflow in an array doesn't cause runtime errors, but can lead to the problems you are describing.
I don't know how experienced you are, but remeber that the 'real' length of a char array is the length och the characters plus one (the terminating '\0'-byte).
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
I checked this already. But with no result...
|
|
|
|
|
Ok. Did you try a "Rebuild All"? (Probably, but I must ask).
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Of course. Not only one *g*
|
|
|
|
|
Then I'm out of ideas, sorry.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Hi,
How can i programatically find if particular machine is active or not on a LAN.
Warm Regards,
Mushq
|
|
|
|
|
|
Pinging the machine might work, unless the machine has been set to ignore such requests. You could use something like NetServerEnum() .
Also, check out NetWkstaGetInfo() and NetServerGetInfo() . Without actualy trying them, I'm not sure what they return when the specificed machine is not on.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How about this one IsDestinationReachable(....).
|
|
|
|
|
Mushq wrote: How about...
...trying it and see?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
IsDestinationReachable(....) is working fine, I got this API when i had already raised the question on this forum.
Thanx a lot and warm Regards,
Mushq
|
|
|
|
|
|
|
elissa1001 wrote: well i solved it but the output is always wrong...
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I've been trying for about a month and a half to integrate direct3d into a mfc dialog box
the best i've found is direct3d integration into a mfc single document project...
can anyone please pretty please tell me how the hell can i integrate direct3d into a dialog box
many thanks in advance
Nuno
PS: i'm kind of desperate
|
|
|
|
|
|
Thats cool
Thanks...
But i can't aply it...
I get assertions errors...
here's the code i'm using
http://www.directxtutorial.com/Tutorial9/B-Direct3DBasics/dx9B5.aspx#still
i just took away the winmain and the mainproc
anyway, does any anyone has some code about it? ( direct3d on MFC dialog based )
i'll be way happy if it just shows a d3d render ... i can get my way around it just with that
Thanks
Nuno
|
|
|
|
|
You will have to show us the way you have set up your code, and then what errors you get too. Just a quick question, are you linking the appropriate .libs?
Also, is this the first DX stuff you have done or have you done similar things before? Have you tried simply compiling the example source to be sure it works?
|
|
|
|
|
Hi,
I want to display a Modaless Dialog box instead of Modal dialog box in mfc application.So,I called Create function instead of DoModal() inside the InitInstance() but I am getting Debug Assertion Failed error.
CDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.Create(IDD_DIALOG1);
if(nResponse)
dlg.ShowWindow(SW_SHOW);
else
MessageBox(NULL,_T("Error"),_T("Error"),MB_OK);
I dont know where made the mistake???
Siddharth
|
|
|
|
|
While creating dialog box pass the second parameter as NULL. After successful creation of dialog you have to assign the address of the dialog to the m_pMainWnd.
int nResponse = dlg.Create(IDD_DIALOG1, NULL);
if(nResponse)
{
m_pMainWnd = &dlg;
m_pMainWnd->ShowWindow(SW_SHOW);
}
else
{}
I think this will solve your problem.
|
|
|
|
|
Thank you,
I have to globally define the dlg instance,
CMfc_Modaless_vc6Dlg dlg;
CWnd* m_pMainWnd = &dlg;
while I do this after the application instance creation it is giving the same Debug Assertion Failed problem.I cannot declare the Dlg locally,so what i can do for this?
Siddharth
|
|
|
|
|
siddharthsan wrote: I have to globally define the dlg instance,
You should not have to do this.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
tvrsrao wrote: After successful creation of dialog you have to assign the address of the dialog to the m_pMainWnd.
Why would you say this?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|