|
Thanks. Thats very kind of you to offer to look at it. I have a good machine at home, so I'll be able to work on it there. Then on Tuesday (we have the coming Monday off) I'll be back to deal with this. I agree that the MSJ site is not a hacker site. But thats all I've done this morning. Please dont feel responsible for this.....I really value your suggestions and help.
Appreciate your help,
ns
|
|
|
|
|
I wrote to Paul L. and he answered me within minutes!!! He doesnt know what could have happened.....
Appreciate your help,
ns
|
|
|
|
|
What a nice guy he must be! Please tell me the end of the story (when you know it). Good luck.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi Joaquin,
Heres the promised update! Paul D. and I exchanged maybe a half dozen emails and he couldnt think of what had gone wrong. I was configuring another machine etc this morning and just as a last ditch effort, killed the registry entries my project makes, though it looked perfectly uncorrupted. To my unexpected delight, that resolved the problem! I rebuilt the keys and all is well (until I crash again - just a matter of time! ) Anyways I did not expect that would be the resolution. I am so relieved as you might guess! So thanks for the moral support> I even have to nerve to re-undertake the splash screen effort again, though not with P D's class...
Thanks again and I hope that you will still in the future point me to useful resources. I value your responses tremendously!
Sincerely,
ns
|
|
|
|
|
Hi
I issued this problem recenty but now I know a bit more about its nature.
I'm trying to store some data in MsOffice files and the problem is that MsWord 2000/XP removes my data after I save document from the Word (I tried also MsWord 97,MsExcel 97/2000/XP and here my data remains untouched). Now some explanation how I store my data in doc file:
1. Using StgOpenStorage I open office file as a compound file
2. I create new storage with IStorage::CreateStorage
3. Within newly created storage I create new stream using IStorage::CreateStream
4. I store my data within newly created stream using IStream::Write
5. I release all opened streams and storages
I discovered that when in doc file Word adds stream 0Table (1Table is probably always present) my data doesn't dissapear (I don't know why). I don't know how to prevent Word from deleting my data but I suppose that forcing Word to add 0Table stream could solve my problem (but how can I do this). I would appreciate any hints.
Mariusz Popiolek
|
|
|
|
|
Hi
Currently I've generate a DLL who construct a Log file (CMyLogFile => global) depend on the application which uses this DLL.
But the problem comes when several applications in the same directory use this DLL. I must create a different file name for each application, if not the other application does not open (because currently he use the same file name)...
How to generate differents log files name from a DLL using by several application locate in the same directory?
Thanks in advance...
Hello World!!!
from Raphaël
|
|
|
|
|
When your DLL is invoked by a process, it receives an HINSTANCE (in DllMain). Your default implementation of DllMain probably stores this somewhere.
Anyway, you could use this to modify your filename for uniqueness.
Alternatively, see API GetTempFileName()
Jon
Signature space for rent. Apply by email to....
|
|
|
|
|
But HINSTANCE is unique and thus is the same for several process who use the DLL...
Hello World!!!
from Raphaël
|
|
|
|
|
That sentence is a contradiction.
Signature space for rent. Apply by email to....
|
|
|
|
|
No because the HINSTANCE identify the DLL and not the process.
This handle represent the virtual address of the begining of the dll.
I want to know which process call the DLL in the entry point of the dll.
Hello World!!!
from Raphaël
|
|
|
|
|
The HINSTANCE value of each app (in Win32) is the same, 0x40000000 or something, so that wouldn't help. You could get the processID or even the thread ID and that should be nearer to what you want.
Steve S
[This signature space available for rent]
|
|
|
|
|
Use GetTempFileName. This will allow you to specify the path and an extension for your file, and it will guarentee that it gives you a unique file name.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
GetModuleFileName(NULL) returns the path and name of the .EXE used to create the process. In your context this should be unique.
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
I'm loooking at various implementations. They all seem to run for an arbitrary time, then vanish. What if my program still isnt ready to show the UI? How do we make some sort of synchronization between the duration of the splas and the app startup time? Incidentally the app really varies in startup speed....
Appreciate your help,
ns
|
|
|
|
|
don't let the splash screen kill itself. instead, have your main app thread send it a WM_OK_GO_AWAY_NOW message when loading is finished.
-c
Support regime change. Vote.
|
|
|
|
|
Okay. I'll go with that idea. Thank you
Appreciate your help,
ns
|
|
|
|
|
I've used in the past Paul DiLascia's CSplash class[^]. The trick to achieve sync with the appearance of your main dialog is to delay setting the m_pMainWnd member of the CWinApp object till your OnInitDialog is done.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thats a terrific sample you linked me to. Only problem is his app is coming up minimized when the splash disappears. I'm not sure what line of code makes it minimized on startup. I want mine to show up, not minimized. Something in his code is telling it to minimize, and I need to figure out what it is...so that my app works the way I want it.
Appreciate your help,
ns
|
|
|
|
|
I don't know... This is what I've put at the end of my OnInitDialog :
AfxGetApp()->m_pMainWnd=this;
SetForegroundWindow();
and it works OK.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks. I dont know whats happened to my machine since I ran Lascias sample...its got a cmdline.cpp I'm suspecting. Anyways, even after rebooting, my app wont work. Crashes when its processing cmdline info. It works fine on other machines....ideas?
Appreciate your help,
ns
|
|
|
|
|
i need to zip a file dynamically by c++ then send to somewhere. i think i need to learn zip format.
do u know how to zip a file in c++ or give me a line to zip format.
thx
includeh10
|
|
|
|
|
Check out Creating a Self Extracting Executable
There's other similar utilities under the files section of CP also...
"If at any time I announce that a nation or kingdom is to be uprooted, torn down and destroyed, and if that nation I warned repents of its evil, then I will relent and not inflict on it the disaster I had planned. And if at another time I announce that a nation or kingdom is to be built up and planted, and if it does evil in my sight and does not obey me, then I will reconsider the good I had intended to do for it." -- Jeremiah 18:7-10 (God, commenting on the value of the United Nations)
|
|
|
|
|
thank u, my dear ....
includeh10
|
|
|
|
|
|
I dont have this file on my machine. I loaded a CP splashscreen sample in my vc6, and I get:
Linking...
LINK : fatal error LNK1104: cannot open file "mfc42u.lib"
Any ideas on how to fix this?
Appreciate your help,
ns
|
|
|
|