|
You should use GetWindowsDirectory(...) to get the location of the Windows directory on the target system.
You should not have to manually set up any environment variables unless other applications you are using specifically depend on them.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
ChangeServiceConfig(...) can be used to turn that setting (SERVICE_INTERACTIVE_PROCESS ) on and off.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanks James...Let me try them out...
Peace
~ Selva
|
|
|
|
|
Hi Shiv here,
I am in developement of a toolbar for IE7.0 vista. Toolbar works
very fine with protected mode off. But once I turn it on, I found that
it does not even respond to WM_COMMAND, then all other is total invain.
The low integrity and all other questions can come when it will try to access any file or anything. But here it does not even respond to clicks
or hits. please anyone can help me atleast to get the problem other than this.
Regards
Shiv
|| ART OF LIVING ||
|
|
|
|
|
Hi shivditya,
I have a question I think you can help me I want to learning programming for IE(Toolbar) and I searching on the codeproject and find lot of articles about it,but I have a problem with all of them I cant compile their when I want to compling each of them I am getting many errors
that I didnt understand do you know an article that I can learn and it compile without error for example I get this error on the an article
error C2787: 'IInputObject' : no GUID has been associated with this object
Thank you
|
|
|
|
|
.NET comes up with predefined macros like __FUNCTION__ which can be handy while retrieving the function signatures in a program. Is there a way to get the same functionality in lower versions of VC++?
|
|
|
|
|
Copy and paste the macro definitions from .NET to your older project?
|
|
|
|
|
__FUNCTION__ is a special #define created for you by the compiler. Unless the compiler provides it, there's no way for you to code it, unless you do the following at the start of each function:
void API::Function1()
#undef __FUNCTION__
#define __FUNCTION__ API::Function1
{
}
void API::Function2()
#undef __FUNCTION__
#define __FUNCTION__ API::Function2
{
}
void API::Function3()
#undef __FUNCTION__
#define __FUNCTION__ API::Function3
{
} which would get really, really old, really, really fast.
Software Zen: delete this;
|
|
|
|
|
I dont understand what do you need do you want to learning VC++ ?
|
|
|
|
|
Hi,
How can I get the last part ("1") of the file name using strstr or something else ???
char dtSrt[BUF_SIZE] = "C:\\Test\\6.20.1.txt"
char *pdest;
pdest = strstr(dtSrt,"");
Thnx again
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Searching a bit longer proves to be a good option for me ....
char dtSrt[BUF_SIZE] = "C:\\Test\\6.20.1.txt"
char *pdest;
pdest = strrchr(dtSrt,'.');
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
char dtSrt[BUF_SIZE] = "C:\\Test\\6.20.1.txt";
char *pdest = 0;
pdest = strrchr( dtSrt,".");
if( pdest > dtSrt )
{
char c = pdest[ -1 ];
}
nave
|
|
|
|
|
This will point you to the dot separating the file's name from its extension:
char *pExt = PathFindExtension(dtSrt);
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want to lock a file so that another application will not be able to open it. I am using CFile.open method with the flags CFile::modeRead|CFile::shareExclusive. However, after opening the file (and keeping it open) I am able to open the file using the windows api CreateFile function. How can I lock the file so that, the CreateFile function will fail?
C++beginer
|
|
|
|
|
ashokvishnu wrote: I am able to open the file using the windows api CreateFile function.
Can you show code ?
|
|
|
|
|
I found out the problem. If you use createfile function with dwDesiredAccess flag as 0, then it will not try to open the file. It will only check whether the file exists.
C++beginer
|
|
|
|
|
ashokvishnu wrote: I found out the problem. If you use createfile function with dwDesiredAccess flag as 0, then it will not try to open the file. It will only check whether the file exists.
I don't think that is a solution, at least for the problem you posted.
What will happen if another application tries to open your file?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
if you can send the file, may be someone can chk it. I don't understand any particular reason for this to be possible. Like i told you window's does force not to write on a file that is being used.. u can get the exact details from the book "Windows Driver Development"
best of luck
|
|
|
|
|
i am preparing application to test sound at different speaker configuration for Windows vista and Windows XP.
for doing this i am using API SetSpeakerConfig() to set the different configuration and API GetSpeakerConfig()for getting same configuration.
this is working fine in Windows XP. but not in Windows Vista.
The call to SetSpeakerConfig() succeeds in Vista, but doesn't actually change anything.
Is there any way other than by using the Sound control panel.
pavan
|
|
|
|
|
Use waveOutGetDevCaps() and waveOutGetVolume() and waveOutSetVolume() APIs.
|
|
|
|
|
Hi,
Is there a function or something I can use to just get the current year?
Thnx
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
What about COleDateTime::GetYear ?
|
|
|
|
|
Programm3r wrote: Is there a function or something I can use to just get the current year?
SYSTEMTIME sys;
GetSystemTime (&sys);
//sys.wYear has the year that you require
Also you can have a look at
CTime::GetYear()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
check GetLocalTime()
nave
|
|
|
|
|
have a look at CTime::GetYear .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|