|
How can I know which remote computer access which file of my computer?
The remote computer and the local files are not certain?
How can I know it?
How can I finished it with MFC or VC?
|
|
|
|
|
Hi,
I have written a small utility that generates a small setup program. The setup program uses an icon, bitmap and ini file that is selected by the user in the initial utility (the info about the icon and bitmap it should use are contained in the INI file). Essentially this works as follows:
Utility -> User selects a bitmap, icon and output path
-> Presses "Create"
-> The icon, bitmap and a premade executable are copied to
the output path
-> An ini file is generated with info about the bitmap and icon
Whenever the user opens the generated executable, the EXE looks for the INI file to find out which bitmap and INI file it should display.
So far, so good. However, what I really want to do is, instead of having the icon, bitmap and INI file stored as separate files in the same folder as the EXE, I would like to somehow compile them INTO the generated EXE. ie. So that instead of four files being created (EXE, icon, bitmap, INI), only one executable is created. (Perhaps an INI file isn't even needed if it is done this way?) In other words, I need to compile a new executable dynamically, from my program, based upon a premade EXE (I take it that it needs a premade EXE?).
Does anybody know how to do this? I see a lot of tools that do it, but I can't work out how they work.
Many thanks for any help,
Keith
|
|
|
|
|
code project article.
You may also find source code on the net (look for Matt Pietrek's articles on PE (Portable headers)).
And I swallow a small raisin.
|
|
|
|
|
Hi,
Thanks for your reply. I don't exactly want to create a setup program. What I want to do, I have realised, is append the files in a similar way to the DOS copy instruction. Eg. in DOS:
copy /b launcher.exe + bitmap.bmp + icon.ico + config.ini newfile.exe
I basically need a C++ way of doing this. I then need to make it so that the launcher.exe can read from the config.ini file that has been appended to it and find the bitmap and icon that have also been appended to it etc.
I'd be really grateful for any ideas on how to do this.
Many thanks,
Keith
|
|
|
|
|
What are you talking about ? the copy /b does a concatenation of binary files. Doing copy /b results in a binary file, not an execute file.
For an .exe to execute, you need appropriate PE headers.
So you need exactly that "setup" thing. Take the source code and tweak it for your own use.
And I swallow a small raisin.
|
|
|
|
|
I made an application in C++, there are several functions in this program that have very large number of local variables and large size local buffers. Please tell me that when this program consumes more memory, i.e whenever it runs or whenever it call certain function on stack that has such big variables ??
|
|
|
|
|
If local variables aren't static, the space is allocated on the stack when function is executed. When function finishes, this space is freed.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
I think that when your program calls such function and there is not enough committed memory for stack, it commits required space. That means, the memory consumed by the program may be increased when such function is called.
When function finished, committed memory is not released.
|
|
|
|
|
Under Windows (at least NT/2000/XP; I don't know about 9x/ME), the program's working set (the memory committed to the application) wouldn't grow until the function that had the large local variables was called. At that point, if there was insufficient memory allocated to the stack, Windows would allocate more until it was of sufficient size. After the function returned, the extra space would be left in the stack. I don't know if or when Windows would release that memory for other use.
Gary R. Wheeler
|
|
|
|
|
I'm sending a mail using shell execute and I was wondering if there were methods of filling in the other fields such as subject etc. from ShellExecute?
Cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Are you using a mail server, email client, browser or what? Be more specific. If you're using Outlook and/or exchange you can use the CDO library to do anything you want. If you're using a browser then specify the params in the mailto tag (e.g.; mailto:jdoe@somewhere.com?subject=hey&body=hi&bcc=no@where.com).
Jeremy Falcon
Imputek
<nobr>"C# is the answer to a question nobody asked." - Chris Losinger
|
|
|
|
|
Jeremy Falcon wrote:
If you're using a browser then specify the params in the mailto tag (e.g.; mailto:jdoe@somewhere.com?subject=hey&body=hi&bcc=no@where.com).
This also works with Outlook.
|
|
|
|
|
I've made a tcp/ip server application. The server is a console based program written in pure C++, though it uses Win32 API . I want to add a feature of sending email from it, i.e whenever a client sends a particular message to server, the server send email to some email address on internet. How can i achieve this goal easily ???
|
|
|
|
|
You could reuse ideas from codeproject article.
MFC CAsyncSocket is a thin wrapper on top on winsocks.
And I swallow a small raisin.
|
|
|
|
|
I can't use article u suggested because it requires MFC
|
|
|
|
|
Yes, and what's the problem ? Just remove the MFC stuff.
And if you don't take this code and remove MFC, this article simply teaches you how to send an email without using Mapi32.dll (which is what you end up with otherwise). If you don't like it, well ok, even though you'll hardly find anything better.
And I swallow a small raisin.
|
|
|
|
|
Hello,
I would like to know the best way to upgrade/uninstall a shell extension. Simply unregistering is not enough as Explorer keeps the file locked for a certain amount of time. I also saw one piece of code that restarts the Shell but this is not very elegant because all the Startup Items are relaunched and this causes a mess not counting the disappearing and reappearing of the task bar...
The method I have been using for the last year or so works but I would like to have something more simple. For instance an upgrade is done like this: my installer copies the .dll to a .tmp file then unregisters the .dll and tries to delete the .dll file. It the deletion is successful then the .tmp is renamed to .dll and is registered: everything is fine. If the deletion fails then my installer creates a .bat file that deletes the .dll, renames the .tmp, registers the dll and deletes itself (this is why it is a .bat file: a .bat can delete itself while running, a .exe can't). Then this .bat file is registered in the RunOnce section to be executed at the next reboot. Uninstallation follows the same kind of process.
As you see this is kind of complex... I have been looking on the web for other way to do this but did not find any info. So anyone has something on this topic??
|
|
|
|
|
Hi,
I have done some work related to read and write CD Sectors by using ASPI
SCSI Command in the framework of VC++ 6.0 and windows 2000.
Now my question is:
What are the differences for reading and writting sectors for DVD by using
same method (Aspi scsi command)? Did you have any experiences and Any ideas?
Thanks in advance!
chen
|
|
|
|
|
chen wrote:
Did you have any experiences and Any ideas?
<theory>
The DVD media should be of no or little consequence with its layering and density as compared to CD as long as you have the hardware, as its methods are independent.
</theory>
Jeremy Falcon
Imputek
<nobr>"C# is the answer to a question nobody asked." - Chris Losinger
|
|
|
|
|
Hi,
Now I want to select a MFC extension library for my MFC application. Which is the best? BCGSoft's BCGControlBar or CodeJock's Xtreme Toolkit? It seems BCGControlBar has a good Skin Manager which most appeals me. And Xtreme Toolkit seems lack of this flexibility.
Which provides more control? Which impact the legacy MFC code minimumly? Which is the most easy stuff to programming with it?
There are some free/Open Source MFC GUI extensions, such as Prof-UI, especially GuiToolkit, but all of them seem inadequate for professional development
Please give your advice.
Best Regards,
fhchina
|
|
|
|
|
We use the xtreem toolkit here for some of our new stuff. It was pretty simple to add into the project(s) and update it. The only problem I have seen with this library is that between the most recent update/releases (as its still under development at CJ) is that they change some of the control parameters ranges that the library depends upon and don't tell you. This means that when you upgrade all your floating windows/toolbars stop working and you have to go into your code and renumber all the resource ID's into the correct range.
Its a bit of a pain, but other than that, I have not had any real problems with the library.
Its also cheap, with no royalties.
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
Hi,
Thank you for your reply. I found it difficult to get an answer for such kind question. I hear another one think BCGControlBar is better. But the most feature I want not only for Visual Studio/Outlook/Office 2000/XP style, I also want to give `texture' for my application and make it look and feel outstanding!
I have downloaded evaluation version of two toolkits. It seems Xtreme Toolkit has more samples but lack of documentation, while BCGControlBar is just opposite.
About the price, of course Xtreme Toolkit is cheaper. Maybe because it lacks of Skin Manager .
Rest Regards,
fhchina
|
|
|
|
|
I would advice you to use BCGControlBar. It is very easy to integrate it in the Visual C++ environment and porting application can be done without (many) headaches. About pricing, you get discounts for shareware and freeware applications.
Best regards,
Alexandru Savescu
|
|
|
|
|
Does anyone know of some good code for saving the contents of a View to an image format,
BMP or JPEG would be perfect.
I could do it all manually but I have a feeling something like this has already been tackled before.
cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Hello Asim
I am in search for similar library. If you had found for your project then can you please send me the suggestion,code idea , library for saving the content on the view to JPEG.
Thanking You.
Leave your mark wherever you go
|
|
|
|