|
My apologies. It was unintentional.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
thanks for your help
but I want to have an install program
when it install, all my Dll & ini files set in their directory
and then creat a shortcut to run my demo program.
tnks
|
|
|
|
|
My answer is applicable even if your "demo.exe" is an installation application. Installers like "msi" need extra care, but an "exe" installer is, for all intents and purposes, a directly executable application. So, all I said for executables applies.
However, some new information can be added, knowing that it is an installer. Typical problems with installers (especially custom made installers) is that they often forget people can have the operating system installed in different directories.
For example, the programs are installed in a "Program Files" directory when the Windows version is English, but are installed in a "Programas" directory when the Windows version is Portuguese. Other complications include additional drives: for example, I may have the operating system installed in drive C: and my programs installed in drive E:.
Depending on the installer you select for your application, you may want to use the following environment variables to make your installer as compatible as possible:
%HOMEPATH% (C:\Documents and Settings\Administrator)
%ALLUSERSPROFILE% (C:\Documents and Settings\All Users)
%SystemRoot% (C:\WINNT)
There are many more. Type "set" at a console prompt to see your defined environment variables.
To do that programatically, you can use standard ANSI code like:
#include <stdlib.h>
char* aup=getenv("ALLUSERSPROFILE")
Again, I sugest you provide more information on the details of your application.
Rogério
|
|
|
|
|
Sorry David! I don't know where was my mind. Next time i will be careful.
Thank you.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Which IDE are you using ? VC6, VC2003, VC2005, ... ? This is important because it is totaly different to deploy VC2005 applications.
|
|
|
|
|
I have a program (demo.exe) that I want get it in my web site and any one who down load it and unzip it in the computer , this program can run correctly even visual studio didn't install on that computer .
how can do that fast .
tnks
|
|
|
|
|
I answered your previous post: if it is C++ you need nothing special besides building the application in Release. Beware that .NET is not as easy.
For the C++ application to run on as many versions of Windows as possible (95, 98, Me, NT, 2000, XP) you should avoid using any "advanced features". The most simple applications (gialog based, or plain single-document like notepad) should then run on any of these OS versions if they are comiled in Release.
But you still don't provide much information about the executable. You already gave a hint that your program is not MFC. If it is not then Release builds will run on all sorts of machines with probably all OS versions. I have a VC2005 console release application compiled under Windows XP running on Windows 95 Intel 386@25MHz with 4 MB of RAM...
|
|
|
|
|
Assalamoalaikum
Akram
When you create a thread for your problem, try to stay in that thread and get your answer there. When you reply to someone's reply, it reaches him.
So do not create a new thread for the same problem.
Thank you
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
I'm using CMemFile class for saving the file in memory. But the serialization becomes very slow while using the CMemFile pointer for saving. I tried changing 'nGrowBytes' of CMemFile class to a high number. But it doesnt help. To put it in simple way, the code looks like this.
CMemFile* file;
CArchive ar(file, CArchive::store);
Serialize(ar);
I need to store a huge file in memory. But it takes very long time for serialization. If anybody knows the solution, plese help me.
Thanks.
|
|
|
|
|
From MSDN:
These memory files behave like disk files except that the file is stored in RAM rather than on disk. A memory file is useful for fast temporary storage or for transferring raw bytes or serialized objects between independent processes.
As far as I know, you are working correctly with the CMemFile (the work is the same as in CFile). nothing to do if it is slow, remember that the file needs to be dumped onto the RAM, and if it is a Huge file , then it should be slow....
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi, Thanks for your reply. Is there a way I can store the serialized data in hard disk memory (not in RAM) so that serialization will be fast?
Thanks.
|
|
|
|
|
Hi,
I am working on a Windows application developed in VC++. The Windows application is required to capture the user inputs from Internet Explorer. For example, when user clicks on “Submit” button in the browser, the Windows application should be able to capture that event and also capture the text box values from the relevant web form. A similar situation is that the Windows application should also have a capability to populate the text boxes of a web form rendered by Internet Explorer.
To summarize, I need to implement an interface between my Windows application and the Internet Explorer so that the windows application is able to read from Internet Explorer and also populate the values in Internet Explorer. This involves the following:
1. Trapping the “Submit” (button click) event from Internet Explorer and Capturing text boxes in the Internet Explorer.
2. Trapping the page load event from Internet Explorer and populating the textbox in the Internet explorer.
I have searched for the related topics on web and also MSDN, I found that BHO (Browser Helper Object) is one of the option. I have tried to implement the BHO interface based on few samples that I found on some of the sites. However, it is not working yet.
Therefore I thought I would grab this opportunity to take help from the expertise involved with this Forum. Any inputs / ideas will be very helpful for me to progress in right direction.
I look forward to your response.
Thank you and regards,
nw.knowledge
|
|
|
|
|
|
Hi,
I need to copy a file of 24MB to a location on a network.
I use CopyFile method. But its extremely slow when the destination path is in a network.
If I copy a file on to the local drive its much more faster. Problem does not occur if the file size is less around 5kb.
Can anyone tell me the reason and an work around?
Thanks
|
|
|
|
|
As i recall CopyFile API is used by explorer applications such as windows explorer, total commander, explorerx2 etc....
try to copy the file manually, and see if it is slow...if it is, than nothing you can do , because the file transfer depends on the network connection.....
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Thanks Yaron,
Indeed the network is slow and not CopyFile.
It took the same time to copy the file manually.
Cheers!
-rt
|
|
|
|
|
in the resource tab of VC 6, only adding BITMAP option is available. is it possible to add other image files as resource eg gif, tiff etc
|
|
|
|
|
Aparently you can add any type of file to the resources, but if you add not a basic file type (such as bitmap, icon etc.) it will appear as binary when you try to look at it...
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Thanks for reply
YaronNir wrote: it will appear as binary when you try to look at it...
Thats right, I want to avoid that, all i want is that other images can be added and displayed as bitmaps are added and displayed.
|
|
|
|
|
As far as i know in VC IDE you can't....
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
want to monitor the changes in the registry,By selecting on of the Root key then monitor the changes in that inlcude key,subkeys.....for name,value and status.
i Add the code in the thread function for monitoring as belowvoid MonitorThread(void* pParam)
{
//here am not understanding what event it returns
// RegNotifyChangeKeyValue(hKey1,TRUE,REG_NOTIFY_CHANGE_NAME|
// REG_NOTIFY_CHANGE_ATTRIBUTES|REG_NOTIFY_CHANGE_LAST_SET,hEvent1,TRUE);
DWORD dwFilter = REG_NOTIFY_CHANGE_LAST_SET, dwType, dwSize ;
char lpszUser[81];
HANDLE hEvent;
HKEY hKey;
LONG lErrorCode;
while(1) {
m_Sec.Lock();
//memset(lpszUser,0,81);
dwSize = 81;
dwType = REG_SZ;
// Open a key. Change second parameter to fit your needs.
lErrorCode = RegOpenKeyEx(hKey, NULL, 0,
KEY_NOTIFY | KEY_READ, &hKey);
// Create an event.
hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
// Watch the registry key for a change of value.
lErrorCode = RegNotifyChangeKeyValue(hKey, TRUE, dwFilter, hEvent,TRUE);
// Wait for an event to occur.
WaitForSingleObject(hEvent, INFINITE);
lErrorCode = RegQueryValueEx(hKey,NULL,0,&dwType,(unsigned char*)lpszUser,&dwSize);
//Add code for reading from the registry key
int item=pList->InsertItem(pList->GetItemCount(),lpszUser);
// Close the key.
lErrorCode = RegCloseKey(hKey);
m_Sec.Lock();
// Close the handle.
CloseHandle(hEvent);
// if(m_cStop1==TRUE)
// exit(0);
//Sleep(1);
}
}
For reading root key i put one combo box in the dialog and selecting one root key by pressing start button starts the monitoring ,if any changes occurs in the that rootkey registry display that key name,value ans status(create/modify/delete).
by pressing stop button stops the monitoring
Thanks,
Kiran.V
|
|
|
|
|
If this code is in a secondary thread, then the following statement is a recipe for failure:
int item=pList->InsertItem(pList->GetItemCount(),lpszUser); Instead you should be posting a message to the main thread (the one that owns the GUI). See here for why.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
How to load more than one image in a particular cell ( for a single item) in a listctrl report view .
Can I arrange the text and images in any order in that cell(eg: image1 text image2 image3)
Remember for a single cell(Item)
Thanking you
SANDEEP A.C
Sanc
|
|
|
|
|
Only way is to draw it yourself....and you mentioned the way you want it to appear....
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
hi
I want to check for Invalid Mail Address in MFC. I have used SMTP to connect & send a mail but if i give inavlid mail id it doesn't display error message.
Can anyone provide me links or code???
Thanx in advance
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|