|
Assembler or not, different manufacturers give different ways to access such information, if any, even different versions of the same motherboard might give you different ways, sadly. I wonder if there is some kind of a standard for such an information that is just not ingegrated into Windows / no manufacturer really follows, or no such thing exists at all. I mean, graphic card manufacturers provide DirectX compatible drivers for their cards (they ought to, noone would buy their card if they wouldn't...), why not providing drivers for motherboards with such a compatibility...*sigh*, well, one can dream, can one not?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
Looks like a glaring omission, as I have searched MSDN and found nothing, Google, no good and on Soureforge the stuff is specific to certain boards only.
I guess I will have to ask users to watch the temps manually when using my benchmarks.
http://www.contract-developer.tk
|
|
|
|
|
When i was googling for this temperature monitoring API thing i saw a link about using Motherboard Monitor to gain temperature information (Motherboard Monitor is a freeware app. that can give you temp and voltage informations afaik), maybe try googling for it, it could be an option, i think the google hit mentioned something about using shared memory to communicate with MBM, if you think, check it.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
I looked through the WMI classes and didn't find anything relevant.
|
|
|
|
|
You may want to have a look at this : http://en.wikipedia.org/wiki/System_Management_BIOS[^]
It is the wikipedia page for the SMBIOS or System Management BIOS standard. Hopefully that has something of value. If nothing else, you have another term to search for. 
|
|
|
|
|
I want to finish functions which can download music files from the internet,
such as: I want to search the song named "yesterday once more",
the I can get many links which can download this song.
so it will be difficult for me to search the song and get the url of it.
can anyone tell me how to accomplish this task?
|
|
|
|
|
Try using a search engine.
|
|
|
|
|
Hi all.
File delete action in windows, display a window with "Confirm file delete" title. How can I get full path of file from this window?
image
thanks a'lot.
modified on Sunday, July 11, 2010 3:12 AM
|
|
|
|
|
I am trying to interact programmatically with another application, and have succeeded in finding the handle of the correct edit box in the application's dialog. However, I can't seem to find a way to send text to the dialog control. The MSDN documetation for ::SetWindowText() states that it cannot be used to modify the text in another application. What other means is there to achieve the text transfer ?
Doug
|
|
|
|
|
I have now managed to copy the text to the clipboard, and then send a WM_PASTE message to the other application. This works, but is it the only way to achieve this transfer ?
Doug
|
|
|
|
|
Personally, I'd use WM_SETTEXT[^]. It's what SetWindowText uses internally.
|
|
|
|
|
WM_SETTEXT is used to set the text of a window.
|
|
|
|
|
Which is precisely why I'd use it.
Recall that an edit control may be created thusly:
hwndEdit = CreateWindowEx(0, WC_EDIT, 0, WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER | ES_AUTOHSCROLL, 11, 11, 147, 23, hwnd, (HMENU)IDC_EDIT1, hInst, 0);
Where
- hwndEdit is derclared of type HWND
- hwnd holds the parents HWND
- hInst holds HINSTANCE of the program
- IDC_EDIT has been defined as an integer used to identify messages from this control
|
|
|
|
|
Yes, I originally made an error in using SendMessage in the way that I set up lParam !!! I've got it working now ! (Much neater than using the clipboard !) So, if ::SetWindowText() ultimately uses WM_SETTEXT, then it begs the question as to why MS doe not allow it to act on "other applications" windows ??
Doug
|
|
|
|
|
Probably because SETTEXT needs a pointer to the text, and that pointer must be valid in the destination app's address space.
|
|
|
|
|
<< Probably because SETTEXT needs a pointer to the text, and that pointer must be valid in the destination app's address space. >>
But if SetWindowText() ends up using SendMessage, the text is in lParam. I'm confused ......... !!
Doug
|
|
|
|
|
you're welcome.
FYI: there are Win32 system calls that help you pass arbitrary amounts of data from one process to another; my LP#TrayIconBuster[^] article has an LP_Process class that shows how it's done in C#; similar techniques could be used in C/C++.
|
|
|
|
|
lParam holds the pointer to the text, and is assumed to be a valid pointer within the process' address space. It can not be an address in some other process.
|
|
|
|
|
>>Param holds the pointer to the text, and is assumed to be a valid pointer within the process' address space. It can not be an address in some other process.<<
Thanks for your patience, Luc !!
So that I can just FULLY understand this, let me describe it back to you with a few extra words (!!):-
The issuer of SendMessage() holds the variable containing the text (my app, in this case), and lParam is set up containing an address to this variable (within the senders address space ?). The receiver of SendMessage()(the 3rd party app, with which i'm endeavouring to interact) has access to lParam which contains the address of the original text, but as I'm alluding to above, is this address within the sender's address space ? I suspect that somewhere within the process, the text is COPIED to some global address space and it is THIS address that is contained within lParam. I can't see how else the process can work whilst protecting each app's memory space.
I await your words of wisdom, and to be "sorted out" !!
Again, thanks for your patience !
Doug
|
|
|
|
|
Hey, Iam looking for a function i could use that is just as easy to use as UrlDownloadToFile() on windows.
C or C++ doesnt matter.
Thanks.
|
|
|
|
|
|
Iam aware of curl, its not as easy to use as UrlDownloadToFile().
|
|
|
|
|
It may not be as easy to use but on the CURL website there's a simple HTTP[^] client in about 6 lines. Open a file to write to and use CURLOPT_WRITEDATA and snip snip, bob's your Aunty:
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl = curl_easy_init();
FILE *output_to = fopen( "output.txt", "w" );
if( curl && output_to )
{
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se" );
curl_easy_setopt(curl, CURLOPT_WRITEDATA, output_to );
curl_easy_perform(curl);
}
if( curl ) curl_easy_cleanup(curl);
if( output_to ) fclose( output_to );
}
Bundle that lot up in a function and you're done...
Cheers,
Ash
PS: There's no error reporting if the transfer goes pear shaped
PPS: I haven't programmed in C in years and not having cURL handy on my home computer I haven't checked the code compiles and runs but it's not far off
|
|
|
|
|
Search for a C++ library offering a HTTP client[^], see if it helps.
|
|
|
|
|
Hi all,
I'm using C++ with Win32 API, no MFC. I have a game with a normal game loop in the WinMain function. Within the loop I call all the processing and drawing and such. But for some reason, when I grab the edge of the application window with my mouse and resize it, the game loop just pauses. I still seem to be receiving WM_SIZING and WM_PAINT messages, which doesn't make sense because my PeekMessage is in the game loop and is not being called. I don't understand what's going on. Anyone have any ideas?
Thanks!!
KR
|
|
|
|