|
This field is actually defined as TCHAR szExeFile[MAX_PATH]; , where TCHAR is either an ASCII or wide character depending on your configuration type (although the doc implies Unicode only). Assuming that you are using this in conjunction with Process32First()/Process32Next() then each call will return the exe path name in this field. If you then wish to store these names in an array you will need to copy them to a new buffer whose address is stored in the array. If your code is non-unicode then you will also need to convert the strings from Unicode to mbcs types.
|
|
|
|
|
typedef struct tagPROCESSENTRY32
{
DWORD dwSize;
DWORD cntUsage;
DWORD th32ProcessID; // this process
ULONG_PTR th32DefaultHeapID;
DWORD th32ModuleID; // associated exe
DWORD cntThreads;
DWORD th32ParentProcessID; // this process's parent process
LONG pcPriClassBase; // Base priority of process's threads
DWORD dwFlags;
CHAR szExeFile[MAX_PATH]; // Path
} PROCESSENTRY32;
this is the struct, and CHAR is typedef char CHAR; ... or am i using a wrong version of the file?
|
|
|
|
|
Nicola Curran wrote: this is the struct, and CHAR is typedef char CHAR; ... or am i using a wrong version of the file?
You are correct, I looked at the MSDN documentation and it showed me the 'generic' version. The version you have is fine and should return you exe path names in ASCII.
|
|
|
|
|
I am Create navigation icon i want to create baloon for that which contain come control eg. link. And how thay handle.
|
|
|
|
|
Has this something to do with C++ ?
|
|
|
|
|
You already had a good reply 4 1/2 hours ago to your question. If you read the article pointed to, it has a button, with a big "balloon", with links in it.
Have a fun evening reading,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
i tried a lot to pass array to excel sheet using xloper structure hear is sample function i wrote to pass array using xloper
<code>__declspec(dllexport) LPXLOPER xarr ()
{
static XLOPER xlArray;
XLOPER xlValues[4];
int i;
for (i = 0; i < 4; ++i)
{
carr[i]=i*2;
xlValues[i].val.num = i+10;
xlValues[i].xltype = xltypeNum;
}
//this will generate array with 4 element 10,11,12,13
xlArray.xltype = xltypeMulti;
xlArray.val.array.lparray = &xlValues;
xlArray.val.array.rows = 1;
xlArray.val.array.columns = 4;
return (LPXLOPER) &xlArray;
}</code>
above function gives only first value of array i.e.10 in the cell from which function call is made
is there is any way to fill the other cell? as i am giving no of row and column in xloper it should fill 3 cell also but that is not happening
please help me in identifying my mistek
Thanex a looot in advance
|
|
|
|
|
i am showing media player on dialog box using MCIWNDCreate function as follows
HWND h_video ;
h_video = MCIWndCreate(this->GetSafeHwnd(),
AfxGetInstanceHandle(),
WS_CHILD |WS_VISIBLE|MCIWNDF_NOMENU|SWP_FRAMECHANGED,filePath);
here h_video is handle of window
by using MCIWNDPlay(h_video);it will play audio file
but it will show that media player on top of dialog box but i want to show that player on anywhere on dialog box.Plz if anyone know this plz tell me how can i show that media on anywhere on dialog box.
|
|
|
|
|
Since MCIWndCreate() returns a HWND , you can use any of the Win32 functions such as MoveWindow() or SetWindowPos() to operate on the window.
|
|
|
|
|
i am new driver development .
i want to know how to create project display Mirror driver project with vs...
is there any wizard to create this project or i will create from begin.
please help me.
thanks
|
|
|
|
|
|
i know how to create project of ddk mirror driver
but i dont know how to debug it
i use ddkbuild but i dont know to use it.
may give some project with ddkbuild
|
|
|
|
|
|
Hi,
I use connection to sql server:
Internal::_ConnectionPtr m_pConnection;
m_pConnection.CreateInstance( __uuidof( Internal::Connection ) );
when I am currently testing my application in remote (server sqlserver in another machine) everything works as it should.
But when I simulate a network outage (disconnect and reconnect the cable network) and I run a query to read attributes (for example) I noticed that my application does not know the basis which has been connected even though the tests on the connection it gives me yet opened(pConnection->GetState() = adStateOpen)!
So I wonder how to know if there is a network outage or how to create a connection attempt and also the best test on the connection that it is still connected to my database.
Thank you
|
|
|
|
|
With MS VC6.0 :
Can printf() and the other derivatives such as CString::Format() be made to produce comma thousand seperated formated numbers ?
I tried the following code but it does not seem to be supported:
long n = 4523123 ;<br />
printf("%'ld", n) ;
Expected Result : 4,523,123
|
|
|
|
|
Hi Neil,
I would suggest using the GetNumberFormat Function[^] with the locale id of English_USA.1252.
TCHAR szFormatted[MAX_PATH] = {0};
LCID lc = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
GetNumberFormat(lc,0,_T("4523123"),NULL,szFormatted,ARRAYSIZE(szFormatted));
Best Wishes,
-David Delaune
|
|
|
|
|
Neil Urquhart wrote: Expected Result : 4,523,123
Tak a look at the "N" type on the MSDN Format specifiers[^] page.
[edit]Sorry my mistake this does not (as David points out below) apply to printf() . I was on the .NET MSDN page and did not look at the header closely enough. [/edit]
modified on Friday, October 23, 2009 8:57 AM
|
|
|
|
|
Richard MacCutchan wrote: Tak a look at the "N" type on the MSDN Format specifiers[^] page.
For printf() ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks; my bad 
|
|
|
|
|
Is this implemented in VC6.0 ? MSDN suggests it is VS2003 onwards only.
|
|
|
|
|
Neil Urquhart wrote: Is this implemented in VC6.0
No, sorry my previous post was originally wrong. I've changed the message to correct my mistake.
|
|
|
|
|
Hello Friends
I m very close to one of my target If u help me to solve this.
I hv to get value from SendMessage.and I m using like this.
Int ID;
int view = (int) SendMessage(pshell,WM_COMMAND,ID,0);
But it is returning always same value for ID.
I also tried WPARAM wparam in place of ID too but no result.
PLZ suggest me some solution.
Actually I m getting tht value for view in dialog.
thx
|
|
|
|
|
What are you trying to do ? The 3rd parameter of SendMessage is a WPARAM which depends on the type of message you are sending, it doesn't return something to you...
yogeshs wrote: I also tried WPARAM wparam in place of ID too but no result.
What do you mean ?
|
|
|
|
|
I m getting view type from dialog
while setting I m using
0x7029 Icons
0x702B List
0x702C Details
0x702D Thumbnails
0x702E Tiles
default for each view
But how do i get tht for different view?
|
|
|
|
|
The only thing I can reply is Liquid Nitrogen[^].
Now, if you want a more serious reply it would be nice to explain what you are trying to do (at a higher level). I'm really totally confused about what you are trying to achieve
|
|
|
|