|
Aqueel wrote: 3. Select Genral tab, Under Microsoft Foundation Class, select
Use MFC in a Static Library
No mention was made of MFC.
"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
|
|
|
|
|
Well, in fact you didn't mention much.
I'll assume that what you want is:
1) Install the application in the web server
2) Make it possible for people to download it
3) Make it so people can run your application on their environment
To install the application in your web server you shouldn't need any special conditions. But, in fact, you don't say much about this. Do you host your web site? Did you make the site (HTML pages)?
Then, after clarifying what you want to do about point 1), you need to determine how people can reach your application. Installing the "demo.exe" file on a web page is not difficult, and if the users click on the link they will, typically, see a dialog box asking them if they want to execute or download the file.
If this were true for all people then point 2) above was not necessary, since the solution would be trivial. But the most recent operating systems have all kinds of firewalls and protection mechanisms that block executables, or make it much more difficult for people to download and execute them. Some antivirus programs that the user may have installed make it even more difficult to download your "demo.exe" and run it.
So, you may consider several options for your "demo.exe". The simplest one could be to wrap your application in a ZIP file, since these files are much more accessible. So, people would download "demo.zip", open it, and execute it. Although this makes it easier to get through some protections it is not full proof, and the user must have the ZIP (or UnZip) application installed on their system.
And there is also the corporate users. Anyone trying to download your application from within the company where they work will probably be blocked, even if you put the application inside a ZIP file. This will depend on the security policies of the company, and how strongly they enforce them.
Number 3) above concerns the client-side requirements. If you compile your application as "Release" then most Windows users can run your application, since all Windows contain most Release DLL's. If you distribute your program in Debug then the users may run into problems, since Debug DLL's are not, typically, included in Windows installations.
The above statement is not true for any .NET code. This code requires a virtual machine of about 22 MB to be installed in the client. Not all Windows installations have this, especially those before Windows XP. I'm not sure which have it and which do not, but you can google for this information. However, the statement is true for MFC applications, so you don't need to statically link. Your application is not MFC? Feel free to ignore the previous sentences...
Then, there is the problem of compatibility with very old operating systems, like Windows 95. This, of course, depends on the features your applications uses. For a simple dialog based GUI with some buttons you should be fine.
So, as you can see, your post provides very little (or no) information for a topic that is relativelly complex. You may want to ellaborate a little bit. Please take into account that downloading executables is considered to be the most dangerous way of spreading viruses, and people are becoming much more aware to that. I would, probably, not download your executable simple because it is an executable.
To get applications to run on the client machine after being downloaded from the WEB you should consider JAVA. It is not a hard language to learn, and it is considered much safer than executable binaries. So, the download and execution process become very simple.
|
|
|
|
|
Rilhas wrote: Well, in fact you didn't mention much.
You're right, other than my asking aquaal why he suggested statically linking with MFC even though akram made no mention of using MFC.
"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
|
|
|
|
|
Oh David! I am Aqueel, not Aquaal
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
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
|
|
|
|
|