|
Sounds like you're breaking inside the memory allocation code; this is usually because you've trashed some memory elsewhere (tried to free memory twice, overwritten beyond the allocated area, written to memory after freeing it).
If you have a DEBUG build, there's usually a diagnostic of some sort generated in the output window when you run under the debugger.
Steve S
[This signature space available for rent]
|
|
|
|
|
in my C++ app, i nned to run a java app with process and pipe re-direction for any output.
when initialize, i set:
STARTUPINFO si;
si.dwFlags=STARTF_USESHOWWINDOW|STARTF_USESTDHANDLES;
si.wShowWindow = SW_HIDE;
//more somethings
problem (with java 1.3):
if i hide dos window, the java app is hidden also. if show, both are shown.
i hope user only sees java app, no dos window.
i tested with java process to exec the java app, no dos window appears!
but i have to use C++ ...
please help ...
includeh10
|
|
|
|
|
Hi guys,
If I use the STL find algorithm, it returns an iterator. Is there any way for me to determine from the iterator, at what index the item was found?
Thanks
Senkwe
ASP.NET can never fail as working with it is like fitting bras to supermodels - it's one pleasure after the next - David Wulff
|
|
|
|
|
Assumming the iterator belongs to an indexed contaner c (like std::vector ), then std::distance(c.begin(),it) should yield the index.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquin, i've often wonderered, how is your name pronounced?
Signature space for rent. Apply by email to....
|
|
|
|
|
Following the notation of www.m-w.com, it is something like
/kö-a-'kEn/
where k is the sound of scotch Loch or german Bach. Many people diphthonguize the first two syllables into:
/kwa-'kEn/
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Brilliant!
Thanks Joaquin.
ASP.NET can never fail as working with it is like fitting bras to supermodels - it's one pleasure after the next - David Wulff
|
|
|
|
|
I have created CMyView class derived from CHtmlView. I use this class to show text from html file. I want to know how can I get text in CMyView at position that mouse clicked?
|
|
|
|
|
In the web world, clicking with the mouse doesn't set any position, since the Html renderer dynamically stretches the content so it fits.
Now if the user selects something with click+drag, then the MSIE DOM allows you to get the current selection. See MSDN stuff like InnerHtml.
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Hello all, I have written a little MFC application (i have VC6 standard edition) and would like to distribute it shareware on a low deployment basis.
Now, checking out a MSDN document ('redistributing VC++ 6.0 Applications') and reading carefully the 'redist.txt' document in the Visual Studio CD, i have noticed that there is a comprehensive, not short, list of what DLL's I ought to include, but i'd like to determine, if possibile, just only , say, 'the minimum' dll set.
1) I think i could just distribute these (i have no database support in my application):
-mfc42.dll
-msvcrt.dll
and:
-msvcp60.dll <-- is it really necessary?
-msvcirt.dll <-- is it really necessary?
-atl.ddl <-- is it really necessary?
2) I plan to put these files in the app directory, not on the system or system32: anybody knoews in there would be some problems with win98, win98SE, win ME and win XP? I read somewhere about a slight different way of checking the dll path in these OS.
3) In the MSDN document i read 'the mfc42.dll' SHOULD be registered on the target computer to ensure 'all mfc funcionality' is present. somehwere (If i am not wrong even searching on this excellent forum) somebody told this is actually not necessary.
Thanks in adavance for any suggestion/tip about the above
Joe
|
|
|
|
|
1) If you use MFC as static link, you don't need either of these DLLs (all the code is embedded in your exe or dll).
If you use MFC as shared dll (default behaviour) then yes redistrubtion problems arise.
mfc42.dll and msvcrt.dll are the primary release dlls and are needed. But msvcirt.dll, msvcp60.dll, and a few others (including msstkprp.dll) may be required depending on whether you use them. To know it, just use "Dependency walker" and figure them out. Otherwise you could rename one of those dlls and try to run your program. If it runs fine, now you know...
Be warned, if <winsysdir>mfc42.dll is already installed (but in an older version) and locked by another process, then you won't be able to overwrite it until next boot-time. And you'll have to add a win.ini entry and stuff ==> use InstallShield for this purpose instead.
atl.dll is often not needed. Default use of atl is static linking, thus atl.dll is not needed. Again, check this out with "Dependency walker" (static report is enough). You may also check out your project settings : if there is no _ATL_DLL, then you don't need atl.dll at all.
2) Go on. It's fine. ::LoadLibrary() always consider the current directory, so as long as your app loads those DLLs at launch-time (before you do any ::SetCurDir(...)) it's ok.
3) mfc42.dll is actually a COM component. Just ask Install shield to register it. Or dfo yourself a regsvr32 mfc42.dll
x) A question you didn't ask. What about restricted profiles, such lke those from NT/2K/XP : in fact, you can't rely on raw installation (belive it or not) : you MUST use Windows Installer. .msi files are the only files allowed to install anything on a client desktop with restricted profile. Of course, you may end up asding the end user to log as local admin, but now you know...
To manage .msi files (and embed .msm MFC merge modules), use either VisualStudio Installer, or InstallShield 7, or upgrade to VC7.
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Hello Stephane
first of all, thank you A LOT for your fast reply
1)
>>If you use MFC as shared dll (default behaviour) then yes redistrubtion problems arise.
Unfortunately VC 6 standard allows only mfc shared dll linking so i have no choice
1b)
>>Be warned, if <winsysdir>mfc42.dll is already installed (but in an older version) and locked by another process, then you won't be able to overwrite it until next boot-time. And you'll have to add a win.ini entry and stuff ==> use InstallShield for this purpose instead
VC 6 standard doesn't ship InstallShield, so i use Inno Setup free installer with a statement like (if installing in the default sys dir, otherwise, as i would like to do, in the app dir itself just cut the destidir section):
Source: "c:\vcfiles\mfc42.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall regserver
; alwaysskipifsameorolder and the Flag uninsneveruninstall on all of the above files,
; since you would not want to potentially overwrite newer versions of the existing files
; with older ones, nor would you want the uninstaller to ever delete them.
>you won't be able to overwrite it until next boot-time. And you'll have to add a win.ini entry and stuff
Could you kindly tell me what win.ini entry and stuff would be required?
2) OK
3) OK, i think Innosetup can do the regserv stuff too
x) you are right, anyway with Inno Setup i can write something like below:
; Administrative privileges are required
; In order for the files with the restartreplace flag to install successfully
; on Windows NT and 2000, the user must have administrative privileges.
; By default, Inno Setup installations do not check for administrative privileges.
; It is recommended that make your installation script check for this,
; by setting the AdminPrivilegesRequired [Setup] section directive:
; [Setup]
; ...
; AdminPrivilegesRequired=1
; ...
; If this is not done, and the user doesn't have administrative privileges,
; an "Access Denied" error message will be displayed during the installation.
y)
>> To manage .msi files (and embed .msm MFC merge modules), use either VisualStudio Installer, or InstallShield 7, or upgrade to VC7.
Do you know if the only way to get this upgrade would be to purchase the full Visual Studio .NET or maybe they sell just only the VC7 as a separated product?
Again thanks a lot in advance for your * very appreciated * help!
Joe
|
|
|
|
|
Anonymous wrote:
Unfortunately VC 6 standard allows only mfc shared dll linking so i have no choice
You are running a project on a low-budget basis.
Anonymous wrote:
so i use Inno Setup free installer
So your questions go to the InnoSetup guys behind.
Anonymous wrote:
maybe they sell just only the VC7 as a separated product?
Yes, you can buy VC++.NET[^]. Price is here[^].
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Look at this, and tell me why and how.
--------------------Configuration: HydroSrv - Win32 Debug--------------------
Linking...
nafxcwd.lib(oledisp1.obj) : fatal error LNK1190: invalid fixup found, type 0x7562
Error executing link.exe.
HydroSrv.dll - 1 error(s), 0 warning(s)
Extreme programming. Do the No.1
|
|
|
|
|
Linker Tools Error LNK1190
invalid fixup found, type type
The object file has become corrupted. Recompile
Signature space for rent. Apply by email to....
|
|
|
|
|
Still can't work, a lib file must be corrupted
Extreme programming. Do the No.1
|
|
|
|
|
Hi,
When I try to compile a program I get a following fatal error
===========================================
fatal error C1189: #error : "eh.h is only for C++!"
Error executing cl.exe.
===========================================
I'm using VC 6. Please can someone tell me where do I get the right eh.h for VC? It's very critical!!!
Many Thanks,
John Bosco.
|
|
|
|
|
Seems you're including "eh.h" from a .c , try renanimg your file to .cpp extension.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks Joaquin!!
It gave me a bright Idea!!!
Best Regards,
John.
|
|
|
|
|
how set Cursor spot posotion at Center of the Cursor, not at (0,0)?
SetCursor( AfxGetApp()->LoadCursor(IDC_CURSOR1));
....
Thank you!
|
|
|
|
|
Usually in resource editor, you have a button "Set Hotspot". I see that you have a custom cursor, so I don't think you need to do this at runtime
Romeo JUNCU
|
|
|
|
|
|
Hello,
I'm using SetWindowPos with SWP_SHOWWINDOW | SWP_NOREDRAW | SWP_NOCOPYBITS to move a window contains a picture to a specific position. If I do not use the SWP_NOREDRAW flag everyting's fine but I can see the window covered by the resizing window redraws somewhere while the window is resizing. If I use SWP_NOREDRAW the covered window will not redraw and the old window's edge still on the screen if the new size is smaller. How do I fix this problem? I tried to do:
::InvalidateRect(NULL, NULL, FALSE);
RECT rcFrame = { x, y, nNewWidth, nNewHeight };
::InvalidateRect(NULL, &rcFrame, FALSE);
but the covered window draws each time I resize the window which makes the screen blinks.
Do you have any idea how to resize a window without letting the covered window redraw the area that's going to be covered?
Thanks,
Hiu Sing Ngai
|
|
|
|
|
Hi all,
I have a little problem, I need to build an application to set the password for the network and the one for the workstation to the same password,
Can any one help me on my way or tell me were to find the code.....
Here's the program flow:
1-checker runs in the background after boot up
2-user is prompted for the network (W2K Active Dir) password change
3-user changes password
5-changes are made to the register (somewhere)
6-Checker checks if registery keys are changed
6-When changed then the checker pops up with dialog box
7-Dialog box asks to confirm the password again
8-the confirmed password is used to change the local account
Note : the "checker" is the program to be build
Thanks in advance
|
|
|
|
|
oke,
I now found out that I have to write a .dll to sit on the domain controller and return a value to the account, but does anyone know some program for this or how to write it?
And then I need to process to catch the value (like a sniffer?) and set that to put the password into the local account on the machine.
Is this possible?
Thanks
regards,
Cornelis
|
|
|
|
|