|
Run depends.exe, on both OS, if its shows some missing dll. Try to ship it with your dll, and test.
|
|
|
|
|
Hello,
I have matther with how to detect the memory infromation in windows platform. I want to get the some memory information, just as memory total size, memory type, memory manufacture, memory frequency, and so on. just the memory information in windows platform. Can you help me? How to do that? I hope your reply, thanks.
Hanson David
|
|
|
|
|
|
|
Dear WhiteSky,
Thanks for your kindly help, I have review the WMI correlative knowledge, but I don't how to implement it. Can you give me some example using the WMI method to get system information, thanks.Hope to get your help...
|
|
|
|
|
well i see your reply now.did you see this link is your problem solve?
|
|
|
|
|
HansonDavid wrote: I want to get the some memory information, just as memory total size, memory type, memory manufacture, memory frequency, and so on. just the memory information in windows platform.
This will get some of what you're looking for:
<br />
void some_function(void)<br />
{<br />
LPMEMORYSTATUS buffer;<br />
<br />
::GlobalMemoryStatus(&buffer);<br />
}<br />
The MEMORYSTATUS buffer looks like this:
<br />
typedef struct _MEMORYSTATUS {<br />
DWORD dwLength;<br />
DWORD dwMemoryLoad;<br />
DWORD dwTotalPhys;<br />
DWORD dwAvailPhys;<br />
DWORD dwTotalPageFile;<br />
DWORD dwAvailPageFile;<br />
DWORD dwTotalVirtual;<br />
DWORD dwAvailVirtual;<br />
} MEMORYSTATUS, *LPMEMORYSTATUS;<br />
GlobalMemoryStatus() is inside winbase.h, and I think MFC includes this by default, so you probably don't need any extra headers.
-Greg Dolley
|
|
|
|
|
Greg Dolley,
Thanks for your help, but I expected to get more information, not only the memory size. Bascially, I want to know the all dimm socket memory information, including the memory size, memory type, memory manufacture, and so on. Mabye the Win32_PhysicalMemory class of WMI will helpful to me, but I don't how to use it, can you help me? thanks.
|
|
|
|
|
Hi, here's the project:
A windows program written in C++ which will interact with a web application in Ruby on Rails. I don't even have a clue where to start. Is there sample code on this? Can someone point me to a good location to start my research? Thanks.
|
|
|
|
|
Hi,
I am trying to support Japanies character format throught windows 2000(Deafult English Language) and UNICODE application. I am using code page 932(Shift-JIS) though I am not able to convert the text to unicode. Event though I am entering text IME still it converts to Garbage characters. Same case with txt file stored in Shift-JIS format.
Similar case with code page 50221.
regards,
Nilesh
|
|
|
|
|
I have had a few similar problems with Chinese recently. In order for me to help you I need to know exactly what your code is doing and how. I'm guessing you are reading a MBCS file and trying to convert it to Unicode. How are you converting the characters? You say garbage characters, but did you check the hex value of each character to make certain they are really unicode? how are you displaying the characters, cout, messagebox, control window or some other means?
It would be best if you could show some code to tell me exactly how you are handling the characters and conversion.
|
|
|
|
|
Hi am Accepting one string from user in one edit box and display it in another edit box after conversion. For conversion I am using code page 50222.
The code is as follow.
OnXyzBtnClick()
{
CHAR *multibyte_buff= NULL;
CString str = _T("");
TCHAR *unicode_string = NULL;
int unicode_size = 0;
int multibyte_size = 0;
DWORD error_code = 0;
GetDlgItem(IDC_EDIT_SHIFTJIS)->GetWindowText(str);
_bstr_t bstr = str;
multibyte_buff = bstr;
multibyte_size = MultiByteToWideChar(50222,NULL,multibyte_buff,-1,unicode_string,0);
error_code = GetLastError();
unicode_string = new TCHAR [multibyte_size];
MultiByteToWideChar(50222,NULL,multibyte_buffmultibyte_size,unicode_string,multibyte_size);
error_code = GetLastError();
str = unicode_string;
GetDlgItem(IDC_EDIT_UNICODE)->SetWindowText(str);
}
|
|
|
|
|
I have a small question
How can I use the returned array (UintArray) to populate the combobox ??
I am trying but as the Addstring function takes String as argument , its not working ..
when I try to explicity cast it with CString it works, but the values returned are just garbage ...
can any one help me achieving this please !!!
thanks
|
|
|
|
|
CUIntArray arUint;
arUint.Add(123);
UINT n_element = arUint.GetAt(0);
char szElement[32];
itoa(n_element,szElement,10);
m_comb.AddString(szElement);
|
|
|
|
|
Thankyou verymuch mate .. It worked like a charm
thanks for your help and support
Imran Bashir
|
|
|
|
|
...
CString str;
str.Format("%u",m_nArray);
m_Combo.Addstring(str);
|
|
|
|
|
Hi,
I have a DLL project and no matter what I do I cant get it to produce a lib and a exp file. I use __declspec(dllexport) and the linker otions clearly show an implib directive stating: /IMPLIB:"Debug/muParser.lib". I have no idea what's wrong. Any help is apreciated.
|
|
|
|
|
you need to export some symbols/function to produce .lib file.
|
|
|
|
|
I read about the PictureBox class and saw that it requires the namespace:
System.Windows.Forms
you can see it here at the end of the article:
PictureBox[^]
How can I use the namespace?
I tried to write:
using namespace System.Windows.Forms but it doesn't work.
How can I use right the namespace?
(I'm using vcpp 2003)
Thanking you in advance!
SnaidiS(Semion)
|
|
|
|
|
Hello
You can't use .Net framework directly from unmanaged C++ code. You have to use C#, or make a managed C++ project, ie. CLI.
Regards
|
|
|
|
|
oh Ok ty,So what can I use at CVPP that makes the same\almost the same like PictureBox?
SnaidiS(Semion)
|
|
|
|
|
Hello
I'll assume that CVPP is Visual C++, right? Well, like it in what exactly? What functionality do you need in your pictureBox that is not present in the MFC Picture Control?
Regards
|
|
|
|
|
Ty, maybe it's good too but I can't find a documentation on MSDN about it.
It just not there.
Can someone please help me to find the documentation?
SnaidiS(Semion)
|
|
|
|
|
Ok I was arranged thank you!
SnaidiS(Semion)
|
|
|
|
|
After 3 weeks of 18x7 trying to retrieve text from the item 0 of a virtual list view control, came to realize that must have the pointer to the item data in the DRAWITEMSTRUCT of a WM_DRAWITEM message but, the properties of the struct are 0000(no state!) for the item State and 00000000 for the item Data! Can anyone tell me what the heck is going on here please?
The application could be trying very hard to make this data inaccessible but, how is it doing that? The Window proc. Of the control also appears as subclassed! Could that be the cause?
All in all, there are 2 messages only produced amongst all of the messages sent & received by the control and it’s parent that can lead me to the text, the WM_DRAWITEM & the LVMINSERTITEM, well the former I already explained the problem with and the latter also has the LV_ITEM attributes as follows:
Mask: 0000, State:0000, state Mask:0000, cch Text Max: 84190885 which none of them again help to show the text pointer!
There are no other messages produced that could be of any use other than the ones for the headers that are crystal clear and have all the data showing.
How can I hack the data out of this LV control???? BTW, the hack is quite legal and legitimate.
Thanks for your help
p.s.
the virtual list control has the data painted and drawn onto it so there are not any of the usual setitem/getitem/settext etc. messages available. I have also studied very hard all possibilities of subclassing and hooking but my question remains, how can intercepting the say LVM_DRAWITEM above help? Unless, by subclassing it after receiving the message above and redelivering it back to the control, could I then throw a getitem message at it and hopefully it might then respond correctly??? Or something of similar nature?
|
|
|
|