|
Hello all. I want read/write the CMOS in Windows NT or later. I've knew that is necessary use a driver. Then I would like to know if there is a driver of the Windows that I can call, so that I don't need develop a driver?
Thanks all.
|
|
|
|
|
how can we determine about all communicating sockets on our system.
|
|
|
|
|
|
I would like to open MS Word 2003 via api and send text to it. After that the user should edit the text in word and I would like to catch an event when the document is saved. Would like to do this via com. All examples I found about this belong to office 97 and doesn't work anymore. Does anyone can tell me where to find an example for automation in Office 2003?
|
|
|
|
|
I think you can use Microsoft Word Object library for the same.
open OLE viewer provided with visual studio tools and open the interface tab.
you can find the requried one there.
I think codeproject has some article on the same.
Pls check it.
it is not depends on VC++ 2003 or VC++ 6. u can use either.
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
|
|
|
|
|
Is there a way that we can know all exposed functions and their signatures and exposed data items which dlls and lib files expose, if we donot have any documentation about them, something like resource hacker.
|
|
|
|
|
use dumpbin utility
Loka Samastha Sukhino Bhavanthu..!!!
( May all beings be happy and free )
|
|
|
|
|
You can use DumpBin[^] utility provided by Microsoft. This is console based application
You can use "Dependency Walker" which is provided with Visual Studio tools for the same purpose.
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
|
|
|
|
|
While dumpbin and depends can show the export table, they will not show you the function signatures.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Michael Dunn wrote: ...Depends can translate those into C++ prototypes.
Return type and argument list included?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Yes, because all that info is encoded into the mangled name. For example:
?ConcatInPlace@CString@WTL@@IAEXHPBD@Z becomes:
protected: void __thiscall WTL::CString::ConcatInPlace(int,char const *)
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
What DLL is that contained in?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I just pulled that from a MAP file of one of my apps. I was just demonstrating that the mangled name contains all the info necesary to convert it to a C++ prototype.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
So does Depends also use said .map file, or how does it generate the function's signature?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It's all encoded in the mangled name. You can see for yourself using the undname tool in the PSDK:
F:\>undname -f ?ConcatInPlace@CString@WTL@@IAEXHPBD@Z
Microsoft(R) Windows NT(R) Operating System
UNDNAME Version 5.00.1768.1Copyright (C) Microsoft Corp. 1981-1998
>> ?ConcatInPlace@CString@WTL@@IAEXHPBD@Z == protected: void __thiscall WTL::CString::ConcatInPlace(int,char const *)
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Thanks Mike, but that's undname, not Depends.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi friends,
i'm reading one "character" at time from RS-232 interface and storing it in a character array.I'd like to know whether any in-built functions are there to convert this "single character" into its ASCII hexadecimal eqivalent??
Thanks in Advance...
Rajeev
|
|
|
|
|
rajeev82 wrote: in-built functions are there to convert this "single character" into its ASCII hexadecimal eqivalent??
Hexadecimal equivalent is not something very clear. What do you want to do ? Print this value in a string (using its hexa representation) ?
If yes, you can use printf with the 'x' tag:
char szString[50];
char Temp = 'A';
sprintf(szString,"%x",Temp);
Because a number is neither hexa, decimal nor binary, it's just its representation that can change.
EDIT: changed printf to sprintf, thanks David
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
rajeev82 wrote: ...are there to convert this "single character" into its ASCII hexadecimal eqivalent??
For what purpose? Usually when someone talks of converting from base-10 to base-16, it is for display purposes. When a number is stored, its base is irrelevant. In other words, 123, 0x7b, and 1111011 all represent the same number.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I was about to ask if you are working for the company I use to work for (the only one I know that uses RS-232 and transmits data at twice its size), but then I saw you are in India ...
Anyway, to answer your question:
To convert a number to a text-readable ASCII-Hex representation (that is, each half of a byte is represented by a single hexadecimal character [0-9aA-fF]), use the printf family:
char buffer[100] = {0};<br />
BYTE myInfo = 64;<br />
sprintf(buffer, "%X", myInfo);
To convert an ASCII-Hex number back to a byte, use sscanf:
char* buffer = "AB";<br />
BYTE myInfo = 0;<br />
sscanf(buffer, "%2.2X", &MyInfo);
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Perhaps this helps?
BYTE HexToByte(LPCSTR cpHex)
{
BYTE cRetVal;
if (*cpHex < 58)
cRetVal = *cpHex - '0';
else
cRetVal = *cpHex - '7';
cRetVal <<= 4;
cpHex++;
if (*cpHex < 58)
cRetVal += *cpHex - '0';
else
cRetVal += *cpHex - '7';
return cRetVal;
}
onwards and upwards...
|
|
|
|
|
Hi ,,
I need to disable the maximise button of the window..
Please guide me about this...
Manjunath S
|
|
|
|
|
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style ^= WS_MAXIMIZEBOX;
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return TRUE;
}
Regards
Amar
|
|
|
|
|
CMenu* pSysMenu = GetSystemMenu(FALSE);
pSysMenu->ModifyMenu(SC_CLOSE,MF_BYCOMMAND | MF_GRAYED );
pSysMenu->ModifyMenu(SC_MAXIMIZE,MF_BYCOMMAND | MF_GRAYED );
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
-- modified at 10:10 Thursday 8th June, 2006
|
|
|
|