|
in Vista it points to c:\ProgramData and it is not write access enabled
Чесноков
|
|
|
|
|
Chesnokov Yuriy wrote: in Vista it points to c:\ProgramData and it is not write access enabled Smile
My bad, I assumed it being all user's profile folder, every user may have read/write permission to it. But on a second thought if that was true - then it would introduces security issues - imagine if a non-admin user logs in to the machine and installs an .exe into all_user's_startup folder. Next time administrator logs-in, the same .exe would run under administrator's security privilege.
This might be one reason the default location/name of this folder is changed in Vista, to make more sense.
It seems you may need to create/identify a folder, and have the permission set during the installation - either through your program, or as instruction to the person installing your app. That is the best I can think of - I know that might be something you may already have in your mind as a last option.
-Suhredayan
|
|
|
|
|
Hi...
My code is....
FILE *obj1;
CString str1;
char out[90000000];
char out1[90000000];
int numreturn, i = 0;
obj1 = fopen("txtfile.txt","r++");
numreturn=fread(out,sizeof(char),90000000,obj1);
str1.Format("%s",out);
i = str1.find("somestring");
It shows error.
How to convert char[array] to CString for huge values?
thanks...
G.Paulraj
|
|
|
|
|
char out[90,000,000];
The above variable goes to stack, by default stack size is limited to a far less size than that by the compiler.
-Suhredayan
|
|
|
|
|
Is there any otherway to convert from c[90000000] to CString?
Thanks...
G.Paulraj
|
|
|
|
|
Paulraj G wrote: Is there any otherway to convert from c[90000000] to CString?
Sorry I don't know if something like that can be done. However here [^] is an sample code/algorithm I found through Google, that may help you.
-Suhredayan
|
|
|
|
|
gnanapaul wrote: How to convert char[array] to CString for huge values?
*That* isn't what your problem is! If you're using MFC, you'll do far better by using CString and CFile . Don't you think?
I don't understand the point of writing C-Style code within MFC. There can be no justification for such insanity.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
There's no need for such large buffers.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
gnanapaul wrote: char out[90000000];
char out1[90000000];
If you have to use such large buffers, then I think something is wrong with your code. I advise you revise your design a bit. Why for instance do you need to read the file in one huge chunk ?
|
|
|
|
|
But if you want to continue on your road replace char out[90000000] with a call to memalloc() (and memfree()). And in align with previous answers you could study what memory-mapped files are...
Rozis
|
|
|
|
|
gnanapaul wrote: char out[90000000];
Replace this with:
char *out = new char[90000000];
gnanapaul wrote: char out1[90000000];
Remove this.
"One man's wage rise is another man's price increase." - Harold Wilson
"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...
char *out = new char[90000000];
Its working...
G.Paulraj
|
|
|
|
|
I am working on a project to create a Visual C++ application that loads a grayscale image (bitmap) and performs basic image processing tasks like Zooming/Shrinking, Histogram equalization, basic filtering in both spatial and frequency domains, noise reduction etc. Now I have some basic exposure to C++ coding before but I've never worked with VC++ before and am completely lost trying to build the "app" from the code (which typically involves operating with the pixels). I am told MFCs are the way to go, but it seems too complex for a beginner.
So I was just wondering if someone can help me/point me towards a place where I can get a sort of a basic skeleton MFC which, say has the window and the menus (with the various tasks) designed and can open an image file and extract the pixels from it.
I hope it's not too much to ask for. I am an Electrical Engineer by background and have had not much coding experience before and although I have the logic for this project figured out, I'm running into a brick wall when it comes to coding it. Any help will be much appreciated. Thank you.
|
|
|
|
|
vishal_c wrote: I am an Electrical Engineer by background
Heh - me too.
Run Visual Studio and select File/New/Project to open the new project dialog. Select VC++, MFC, then MFC Application.
You're probably going to want a Single Document Interface (SDI) project type (but mabe not... depends on what you have in mind). This'll generate a skeleton project for you. There are a lot of project options you can specify; play around and seen the differences in the wizard-created code for the various options.
There's also a fairly decent tutorial called 'Scribble' that demonstrates a lot of the basics of VC++ project development. If you have the time, it's worth working your way through it.
|
|
|
|
|
How would I go about hooking Explorer so that any calls to BitBlt get hooked and my application can use the parameters explorer was trying to pass to do something else with them?
|
|
|
|
|
|
Is there a way to determine if a Drivespec, say "F:" refers to a Volume F: on 'this' computer, or whether it is a 'Mapped' drive elsewhere on the Network.
Regards,
Bram van Kampen
|
|
|
|
|
|
Thanks,
Does the Trick Nicely.
Regards,
Bram van Kampen
|
|
|
|
|
I'm able to find the handle to taskbar using FindWindow("Shell_TrayWnd", NULL);
But I want to find the handle to the window containing the text "Run...". I want to change it. It should change to different values at different time. So I can't patch Explorer.exe
I wanna change its text dynamically using SetWindowText, change its styles etc.
Or create some effects like bounce (by movine the window using some mathematical equation)
I tried EnumChildWindows but that doesn't help me.
Plz tell me a way to get handle the child window that displays "Run..."
I want to change the text, move the position and just play around with it!
(Just a hobby project)
-
S.V.Kaushik
|
|
|
|
|
The Run window is not a child of Shell_TrayWnd .
This is why EnumChildWindows doesn't work for you.
The Run Dialog is an independent dialog whose parent is the desktop.
In your case you can get notification that a dialog is appearing by writing a global shell hook using SetWindowsHookEx .
Check if the dialog is the Run dialog and then change its title.
|
|
|
|
|
He is reffering to the Run button in the start menu that makes the dialog appear, not the dialog itself.
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
His suggestion still remains, however. You first have to get access to the dialog before you can worry about any captions or controls on it.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
|
|
|
|
|
If you mean you have to get the start menu 'dialog'/popup before getting the "Run" button on it then I agree.
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
Even GetMenu fails!
I want to find the coordinates of "Run..." that appears in the start menu.
Plz see this:
http://i626.photobucket.com/albums/tt346/yeswekey/run.jpg
I actually don't wanna change the text, but i want to find its coordinates
-
S.V.Kaushik
|
|
|
|