|
Greetings Programs,
I've run into an odd problem and I was looking for some advice.
The following line is from an application I am building:
hFind = FindFirstFile(strcat(cQueueDupe, "\\*.*"), &findData);
Initially I build the application to run as a console app but have decided to expand it into and Windows Service app. As a console application any path I give it will is fine as long as it is valid. Local disks, mounted volumes or UNC paths. Doesn't matter. However, after implimenting the same code as a service (and starting it as a seperate thread from the service thread) the FindFirstFile statement fails for anything that isn't a local disk. At first I thought perhaps I was sloppy in my thread implimentation and removed it but to no avail.
I must admit that I am absolutely at my wits end over this. Hopefully one of you fine persons can show me the error of my ways.
Many thanks,
Rhoam
|
|
|
|
|
FindFirstFile statement fails for anything that isn't a local disk.
That happens because the service is not running under your account, so it doesn't have access to your mapped drives. You'll need to go to the service's properties and set it to log in as you.
--Mike--
http://home.inreach.com/mdunn/
I'm finger-lickin' good!
|
|
|
|
|
OhMyDearGodHowStupidCanIPossiblyBe!
Michael, thank you so much for that. I cannot beleive that such an obvious and common element was completely overlooked in my debugging.
This is by far the dumbest thing I have ever done. Well, except maybe the time I was really drunk and the monkey...
Thanks again,
Rhoam
|
|
|
|
|
|
Hi,
I have a problem I can't figure out. I'm getting KeyUp() and KeyDown() events but I'm not getting an OnChar() Event.
Any ideas or recommendations would be greatly appreciated.
Thanks,
Chris Simeone
|
|
|
|
|
i could never figure that out either. so, i just found another way:
BOOL CAboutDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN)
{
char c = toupper(pMsg->wParam);
if (c == 'C')
.....
return TRUE;
}
return CBaseClass::PreTranslateMessage(pMsg);
}
there may be a more 'correct' way to do it, but this works fine.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
You don't give enough information.
First, what keys are you trying to capture? Some keys will never show up in KeyDown.
Second, what kind of window is it? Dialog? Child? Top level?
There are many things which can cause this.
|
|
|
|
|
When I make a CreateCompatibleBitmap whith the CDC of the Preview Printing and a big Bitmap, the CreateCompatibleBitmap return FALSE. But if I create a compatible DC and I CreateCompatibleBitmap with this DC, that's working
Any idea to explain this.
Sincèrement
Best Regards
Eric ~ Le Souricier Gris <°@_/
http://lesouriciergris.free.fr
http://lesouriciergris.developpez.com
|
|
|
|
|
How can I create an empty COleSafeArray? Thanks
|
|
|
|
|
Programming in MFC C++ using ASyncSocket to derive from. Having problems on close down / class destruction when socket object is created on a seperate thread. Throws up an exception from CAsyncSocket.close() apparently the socket no longer exists but it still determined to close it?
Any Ideas??!!
|
|
|
|
|
Well, when using sockets in another thread, you have to call Detach() from the thread that created it, and Attach() in the thread you will use it. Likewise, when a socket is destroyed, you have to call Detach() and Attach() to make sure that the socket is "owned" by the thread which is trying to destroy it.
|
|
|
|
|
the app i'm developing has to send messages via either fax or smtp mail and i always thought that exchange would route messages correctly if i prefix the address fields with FAX: or SMTP:
on my dev machine i have outlook 2000 as a mapi client but it doesn't seem to do any address filtering, ie, a message addressed to FAX:lauren@fakefur.co.za got bounced back from my isp mail server (not surprisingly) as undeliverable
question is will exchange (with say right fax installed) route them properly ... and if they don't have exchange (only outlook 2000 say) do i have to disable faxing and use only the raw addressing for smtp?
hmmmm ... maybe this isnt explained well but it kinda says what i mean i think ... help appreciated
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
and another question is what is the best way to see if exchange is installed on the network and is used for messaging?
sheesh
i used to think games coding was tough :/
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hello,
I'd like to program an app that determines some information about
a mp3-file.
I already have a routine that can read out the id3-tag. Now i'd like to get out what bitrate, length (in seconds), # of channels (mono/stereo) and frequency the file has. Can anyone help me?
thanks in advance
|
|
|
|
|
|
(May be somebody know).
How I can do than than the one object containers anonther object (by value or by referen) and
second object don't know the first object.
I mean:
class Head
{
};
class Man //see there--> Head --------<> Man //or Head <-------<>Man
{
protected:
Head m_head;
};
Where (step by step) i must pressed (in rational rose UI) for it.
I tried do it but it's generated next:
class Head
{
protected:
Man man; //<-- i do not want it
};
class Man
{
protected:
Head head;
};
//and sometimes was genereted more strange text..
|
|
|
|
|
(May be somebody know).
How I can do than than the one object containers anonther object (by value or by referen) and
second object don't know the first object.
I mean:
class Head
{
};
class Man //see there--> Head --------<> Man //or Head <-------<>Man
{
protected:
Head m_head;
};
Where (step by step) i must pressed (in rational rose UI) for it.
I tried do it but it's generated next:
class Head
{
protected:
Man man; //<-- i do not want it
};
class Man
{
protected:
Head head;
};
//and sometimes was genereted more strange text..
|
|
|
|
|
(May be somebody know).
How I can do than than the one object containers anonther object (by value or by referen) and
second object don't know the first object.
I mean:
class Head
{
};
class Man //see there--> Head --------<> Man //or Head <-------<>Man
{
protected:
Head m_head;
};
Where (step by step) i must pressed (in rational rose UI) for it.
I tried do it but it's generated next:
class Head
{
protected:
Man man; //<-- i do not want it
};
class Man
{
protected:
Head head;
};
//and sometimes was genereted more strange text..
|
|
|
|
|
(May be somebody know).
How I can do than than the one object containers anonther object (by value or by referen) and
second object don't know the first object.
I mean:
class Head
{
};
class Man //see there--> Head --------<> Man //or Head <-------<>Man
{
protected:
Head m_head;
};
Where (step by step) i must pressed (in rational rose UI) for it.
I tried do it but it's generated next:
class Head
{
protected:
Man man; //<-- i do not want it
};
class Man
{
protected:
Head head;
};
//and sometimes was genereted more strange text..
|
|
|
|
|
(May be somebody know).
How I can do than than the one object containers anonther object (by value or by referen) and
second object don't know the first object.
I mean:
class Head
{
};
class Man //see there--> Head --------<> Man //or Head <-------<>Man
{
protected:
Head m_head;
};
Where (step by step) i must pressed (in rational rose UI) for it.
I tried do it but it's generated next:
class Head
{
protected:
Man man; //<-- i do not want it
};
class Man
{
protected:
Head head;
};
//and sometimes was genereted more strange text..
|
|
|
|
|
(May be somebody know).
How I can do than than the one object containers anonther object (by value or by referen) and
second object don't know the first object.
I mean:
class Head
{
};
class Man //see there--> Head --------<> Man //or Head <-------<>Man
{
protected:
Head m_head;
};
Where (step by step) i must pressed (in rational rose UI) for it.
I tried do it but it's generated next:
class Head
{
protected:
Man man; //<-- i do not want it
};
class Man
{
protected:
Head head;
};
//and sometimes was genereted more strange text..
|
|
|
|
|
(May be somebody know).
How I can do than than the one object containers anonther object (by value or by referen) and
second object don't know the first object.
I mean:
class Head
{
};
class Man //see there--> Head --------<> Man //or Head <-------<>Man
{
protected:
Head m_head;
};
Where (step by step) i must pressed (in rational rose UI) for it.
I tried do it but it's generated next:
class Head
{
protected:
Man man; //<-- i do not want it
};
class Man
{
protected:
Head head;
};
//and sometimes was genereted more strange text..
|
|
|
|
|
It's been a while since I used rose, but you need to create a one-way aggregation. You do this by clicking on one side of the connection and uncheck the option that says something like "Navigable" or something like that (can't remember the exact word). You'll notice that if you click on the other side of the link, it will still be checked.
|
|
|
|
|
(May be somebody know).
How I can do than than the one object containers anonther object (by value or by referen) and
second object don't know the first object.
I mean:
class Head
{
};
class Man //see there--> Head --------<> Man //or Head <-------<>Man
{
protected:
Head m_head;
};
Where (step by step) i must pressed (in rational rose UI) for it.
I tried do it but it's generated next:
class Head
{
protected:
Man man; //<-- i do not want it
};
class Man
{
protected:
Head head;
};
//and sometimes was genereted more strange text..
|
|
|
|
|
(May be somebody know).
How I can do than than the one object containers anonther object (by value or bya referen) and
second object don't know the first object.
I mean:
class Head
{
};
class Man //see there--> Head --------<> Man //or Head <-------<>Man
{
protected:
Head m_head;
};
Where (step by step) i must pressed (in rational rose UI) for it.
I tried do it but it's generated next:
class Head
{
protected:
Man man; //<-- i do not want it
};
class Man
{
protected:
Head head;
};
//and sometimes was genereted more strange text..
|
|
|
|