|
Hi,
My client side does not wake up when I send magic packet from Server side using my application.
Though if I send magic packet using free ware utility, client side wakes up properly. What could be probable reason for this?
At client side, I'm using Windows 2000 SP4.
At server side, I'm using Windows 2003 R2.
|
|
|
|
|
I don't know the answer, but do you have checked these circumstances:
* correct port
* correct packet (each little failure will not work)
* propably the protocol ( TCP/IP or UDP )
I wish you good luck
|
|
|
|
|
Thanks for reply.
But whenever I execute Client side on Windows XP, it wakes up correctly. So i think there wont be any problem in port, protocol.
Is there any special way to handle Wake on LAN feature on Windows 2003 R2?
|
|
|
|
|
Do you mean "WOL" with starting the whole computer by LAN?
It seems that you mean something other, because WOL has nothing to do with
Windows, only with the power-supply and mainboard
|
|
|
|
|
hai friends,
my problem is like this.
in my program, (say for example) i will allow the user to select a file, any where in the computer.
now after file selection, i have to create one file in the folder, where my program is available.
i donot give any path while creation. i will simply use open(file1,write).
but this file is created, in the folder, where the selected file is available.
is there any api, which can fetch me the path of the current working folder, such that, i can save my folder there?
thanks for your views.
|
|
|
|
|
Im not sure do you need to GetModuleFileName ?
|
|
|
|
|
vov, hamid,
i tried it. it gave me the filename which iam running, like, d:\myapp\debug\myapp.exe.
this will do for me. what all i want from this string is upto debug. may be i can do some parsing logic here to remove the myapp.exe.
i would be pleased if you can suggest that for me.
got my 5?
thank you.
|
|
|
|
|
See PathRemoveFileSpec()
Real men drive manual transmission.
|
|
|
|
|
Yeah you can use of CString::Left for get full string of some strings of left.
(one thing that it doesnt relative to your answer see my thread on the lonuge I saw a good site with nice wallpaper of milky way )
|
|
|
|
|
nice of ur wallpapers.
why don't you attempt for my algorithm in corresponding forum.
|
|
|
|
|
Im sorry but I dont understand what you said?
|
|
|
|
|
i mean
please go to algorithms forum and try to attempt my post.
thanku
|
|
|
|
|
_splitpath[^] in the CRT lib.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
thanks for your reply roger.
i shall definitely look into it if all my other choices disappoint me.
|
|
|
|
|
Try GetCurrentDirectory()
|
|
|
|
|
Try with...
CString m_szNewFileName = "";
char FileName[MAX_PATH];
GetModuleFileName(NULL, FileName, MAX_PATH);
m_szNewFileName = FileName;
m_szNewFileName = m_szNewFileName.Left(m_szNewFileName.ReverseFind('\\'));
m_szNewFileName += "DesiredNewName.ext"
CFile f (m_szNewFileName, CFile::modeCreate | CFile::modeWrite);
it worked good for me.
This would create the new file in the forlder where the App.exe is.
And afterwards you can delete the file with:
if (f.Open (m_szNewFileName, CFile::modeRead))
{ f.Close ();
f.Remove (m_szNewFileName);
}
EDIT: Nice, my post is the newest one, but has the answers of the post just above (older than mine) :P
-- modified at 5:21 Monday 29th October, 2007
-- modified at 5:22 Monday 29th October, 2007
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
thanks for your response.
GetCurrentDirectory() gave me some clue, to achieve my goal.
but it still fetches me the previous selected file's directory.
how ever with GetCurrentDirectory() , in the initdialog, i can find the folder of the application and preserve it and use it though user changes the current folder.
but instead of that, if i get it directly, it would be better.
did you get my point or do i have to explain better?
|
|
|
|
|
Here you go, this should do what you want.
TCHAR szBuffer[_MAX_PATH] = {'\0'};
DWORD dwLen = _MAX_PATH;
GetModuleFileName(GetModuleHandle(NULL), szBuffer, dwLen);
|
|
|
|
|
no boss
i'm still getting the recent selected file's folder by the user.
thanks for your concern.
|
|
|
|
|
is you application is executable or dll!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi!
Where is SPY++ in Visual Studio 2005 ?
cheers..
Imtiaz
|
|
|
|
|
at this path
<window drive>:\Program Files\Microsoft Visual Studio\Common\Tools\
Regards,
Pankaj Sachdeva
There is no future lies in any job but future lies in the person who holds the job
|
|
|
|
|
I've learned some code and idea from others, I can achieve my goal by mapping the message ON_WM_DRAWITEM, and override the method
void CMyListCtrl::DrawItem(somecode) But I have no idea when does my CMyListCtrl trigger the DrawItem? Even I add the code AfxMessageBox(_T("tell me you DrawItem")); in void CMyListCtrl::DrawItem(somecode), it doesn't kick my ass at all. I am so confused.
My ideas got from others,
if( bHighlight )<br />
{<br />
pDC->SetTextColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));<br />
pDC->SetBkColor(::GetSysColor(COLOR_HIGHLIGHT));<br />
<br />
pDC->FillRect(rcHighlight, &CBrush(::GetSysColor(COLOR_HIGHLIGHT)));<br />
}<br />
else<br />
{<br />
CRect rcClient, rcRow = rcItem;<br />
GetClientRect(&rcClient);<br />
rcRow.right = rcClient.right;<br />
<br />
pDC->FillRect(rcRow, &CBrush(nItem%2 ? ::GetSysColor(COLOR_WINDOW) :<br />
RGB(255,255,0)));<br />
}<br />
So I thick I just need some demo code to teach me. Does Anybody kind to make a demo project implementing that: in the list control, in the odd row, fill color 1, but in the even row, fill color2.
pDC->FillRect(rcRow, &CBrush(nItem%2 ? ::GetSysColor(COLOR_WINDOW) :
RGB(255,255,0)));
is what I want actually.
Do I describe my problem clearly?
|
|
|
|
|
See this[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I'm currently using the Beep method to make, well a beep , sound when an action occurs. This works well on my development machine (a laptop) in the fact that it plays the beep through the sound card to my headphones/speakers. However on the machine the program will run on the beep comes out of the system speaker (the one that makes beeps on startup). Does anyone know if there is a similar method that will allow me to always direct the output through the sound card?
I don't want to start playing sound files as all I need is to play a beep at a set frequency for a set period of time, so something very basic
cheers,
|
|
|
|