|
Hi All
How can i get Document path in vista?I am useing
TCHAR szPath[MAX_PATH];
if(SUCCEEDED(SHGetFolderPath(NULL,
CSIDL_MYDOCUMENTS|CSIDL_FLAG_CREATE,
NULL,
0,
szPath1)))
{
PathAppend(szPath1, _T("abc.txt"));
}
But CSIDL_MYDOCUMENTS it's not working in Vista.So i have also use this CSIDL_COMMON_DOCUMENTS.But result is different. I am geting this path
D:\Users\Public\Documents when i am uesing CSIDL_COMMON_DOCUMENTS.
But i want to find this this path
D:\Users\SystemName\Documents .
Plz help me.
|
|
|
|
|
What do you want? The path of "My Documents" folder of the present user? What do you mean by "not working"?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Thanks for reply
in vista no My Documents folder present only Document folder present. And i want to get Document folder of present user.
What do you mean by "not working"?
I mean when i use CSIDL_MYDOCUMENTS then i am geting null values.
|
|
|
|
|
Try this:
TCHAR szPath[MAX_PATH];
if(SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, szPath)))
AfxMessageBox(szPath);
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Problem solved with this CSIDL_PERSONAL.
|
|
|
|
|
HI, I've got problem with CMAILSLOT
I create two seperate programs
that one is check if there is something wrong in data and will call another program to ring, and it located in server
one is alarm that will ring if it called, located in my comp
The strange is if I use
string like \\.\\mailslot\test\testalarms as initial mailslot, it works well
means that it act like local
but if I use \\ipaddress\\mailslot\test\testalarms as initial mailslot, it doesnt work
anyway, I test it using same computer, going to server , i use remote desktop and run the program from there, other one,just run from my comp,
any idea about this one
thanks very much
Regards,
Arif Liminto
|
|
|
|
|
Hi all,
I have attached a portable device to my pc, and i want to get its internal configrations like (cylinders, heads, sectors etc.).
How can i do this??
Thanks in advance
|
|
|
|
|
I have placed a bitmap on my dialog. Also I placed a button over the dialog. When I run the application, the button goes behing the bitmap and appears as hidden. Pls help me how to place the button over the bitmap.
|
|
|
|
|
How did you place the bitmap on the dialog?
|
|
|
|
|
Importing a bitmap image into the Resources
Using a Picture Control on the dialog and setting the ResourceID to this picture control
|
|
|
|
|
Change the zorder of the button and picture control. Press ctrl + D to change the zorder.
|
|
|
|
|
|
I jus added the picture control in my dialog. and then I imported a bitmap file into the application and gave a resource ID. after that I used the resource ID to get the bitmap in my picture control. The bitmap is coming correctly in my dialog but the button which is behind the picture control is hidden behind the picture control when I run my application. But When I click at that position, the button appears.
|
|
|
|
|
How did you show your bitmap with which event? WM_ERASEBKGND or WM_PAINT
|
|
|
|
|
if you do what naveen suggested it will work fine for u.
|
|
|
|
|
Go to resource file and place the code of bitmap at the top of the dialog properties and then place button properties.
|
|
|
|
|
Advapi32.dll
As what I understand by reading the Microsoft Cryptographic Service Provider Development Kit manual, in order for me to perform signing I need to replace the advapi32.dll in c:\windows\system32 folder.
For Windows 2000, from the manual – I need to rename the current advapi32 to advapi32.bak. Then I expand it the appreciate advapi32.dll for the test platform and replace it in the c:\windows\system32 directory.
For Windows XP and Vista, can I do it the same way/do I also need to replace the advapi32.dll for the purpose to test the signing process?
I try to do it in Vista, but I get a warning message seems that not allowed to modify any files in c:\windows\system32 directory.
UAC in Vista
After I get stuck to replace the advapi32.dll in Vista, one of my colleague told me that it is not necessary to replace the advapi32.dll coz it is only for the purpose to test the signing. So I start to register the dll in Vista. But I got the error msg -the module “mimoscsp.dll” was loaded but the call to DllregisterServer failed with error code 0x800900006-.
I check from the net and I found out that it might be regarding the UAC in Vista. So, I’ve tried to look from net and find out that I need to create a manifest file.
So, my manifest file is like this:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0">
<ms_asmv2:trustinfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
<ms_asmv2:security>
<ms_asmv2:requestedprivileges>
<ms_asmv2:requestedexecutionlevel level="asInvoker">
But I still get the same error.
I already try to run the cmd prompt in Vista-Run as Administrator – but still get the same error.
I try to run VS Studio 2005-Run as Administrator, compile the file, replace to file in c:\windows\system32 – register the dll-> but still get error.
And now I’m stuck. I’m not sure what direction should I take now. Hope you can give opinion about this. Thanks.
|
|
|
|
|
Greetings fellow coders!
Any ideas how i could drop (like in drag-drop) a file onto any application that can receive dropped files programatically? I know this has been asked a few times already but i didn't find any answers yet. Thanks in advance for any suggestions.
|
|
|
|
|
Hi,
I need help in reading a cvs tag/tag name of a file from the C++ program. The OS is Linux.
It would be great even if it is an idea of how to do this?
Thanks in advance.
|
|
|
|
|
scamguru wrote: I need help in reading a cvs tag/tag name of a file from the C++ program.
I'm not sure what type of file that is, but with C++ you can read files using an ifstream object.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Problem is how to get the most recent tag read. if i run a cvs command, it gives me lot of information regarding the tags. But i can't get the most recent tag. And again I have to read the output from the standard output, which is little bit complicated.
Any suggestions?
|
|
|
|
|
scamguru wrote: And again I have to read the output from the standard output...
Which looks like what?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
it is a list of tags. example below,
for example
CODE_1-2-0:1.0.0.1
CODE_1-1-4:1.0.0.1
CODE_1-1-3:1.0.0.1
CODE_1-1-2:1.0.0.1
CODE_1-1-1:1.0.0.1
CODE_1-1-0:1.0.0.1
this will be standard output. and i have to read 1-2-0. This is a command output of cvs log <filename>
|
|
|
|
|
So read each line, and if the first 10 characters are "CODE_1-2-0", you've got a match.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
How can do that ?
"The Awaited Saviour", Mohammed Baqir Al Sadr
modified on Thursday, November 20, 2008 5:09 AM
|
|
|
|