|
DavidCrow wrote: Most likely the problem is still present and is simply being masked by some other operation.
With all respect it can not be posible to have the problem when I don't use multithreads because i use str2 to edit a field in the database and that works fine. I run the program just fine.
|
|
|
|
|
Hi,
I have an MFC ver 4 dll that I want to use in my MFC ver 7 exe.
I created an interface dll that uses MFC ver 4 and calls my main
ver 4 dll. This interface dll does not export any MFC dependent
classes or functions and so I can use it in my ver 7 exe. However I
get a crash in my main dll. I wrote a quick ver 4 exe that uses the
interface dll to call the main dll and it works okay. Is there
some issue mixing different versions of MFC in a single application ?
Nvat.
|
|
|
|
|
you may run in to problems anyway but are you statically linking mfc?
cje
|
|
|
|
|
My main dll links dynamically and I can't change that.
The exe and interface dll both link dynamically but I
could change those if you think it would help ?
Nvat.
|
|
|
|
|
Hi,
every time before the compiler ist starting in VC6 the help compiler
tries to create some files (.inc) in a subdirectory "hlp" (and a window with the help compiler task is opened for one or two seconds) but i don't need this. Is it possible to prevent the call of the help compiler? I seached in the settings of the project and in the general settings of the IDE but i can't found any option to change this behaviour.
Greetings from Frank
|
|
|
|
|
Frank Isensee wrote: Is it possible to prevent the call of the help compiler?
Project --> Dependencies.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
What??? There i can define the dependencies of my projects in the workspace but not for the internal call of the help compiler ... ??? Or can you explain that to me?
Thanx!
|
|
|
|
|
I may have been a little presumptuous. My current project is comprised of three subprojects, one of which is a help file. That's how I go about disabling it when the help file does not need to be built.
Try this. Open the Project Settings dialog (Alt+F7). Select the .hpj file in the file list, and then click Custom Build tab.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ahhh ... the *.hpj-file resides in the list of cpp-files! And there i can disable the generating of the help files ... )
Thanks for help!!!
Greetings from Frank!
|
|
|
|
|
When you create your project, you selected the option that turns on the context sensitive help system. To prevent this, don't select that option in the future. To correct this, you have to go through your project settings and remove the sections that deal with generating help files.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
HELLO
I copied a code from the microsoft documentation in order to list loca eventlogs
but it seems to be writed for .NET version.
but it dosen't work also in .net studio
can Someone help me?
#using <mscorlib.dll>
#using <system.dll>
using namespace System;
using namespace System::Diagnostics;
using namespace System::Threading;
int main()
{
// TODO: Place code here.
EventLog* localEventLogs[];
localEventLogs = EventLog::GetEventLogs();
Console::WriteLine(S"Number of logs on local computer: {0}", __box(localEventLogs->Length));
System::Collections::IEnumerator* myEnum = localEventLogs->GetEnumerator();
while (myEnum->MoveNext())
{
EventLog* log = __try_cast<eventlog*>(myEnum->Current);
Console::WriteLine(S"Log: {0}", log->Log);
}
return 0;
}
|
|
|
|
|
yep, that's managed C++. That'll work in VC2005 Express Edition ( which is free ), but it's never going to work in VC6.
What version of VC do you have ? MAnaged syntax changed significantly between VS2003 and VS2005. This looks like VS2005 syntax to me, but I'm not sure.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have both VC++ 2005 and VC++6
but it didn't work in any of them
|
|
|
|
|
OK, well, it CAN'T work in VC6. In VC2005, you need to provide a little more information if you want people to be able to help you. What did it do ? What version are you using ? What's the code look like ( it looks to me like your original snippet is missing some stuff ).
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
fx9200 wrote: ...it dosen't work also in .net studio
Why not? What's the problem? Copying code and then saying it doesn't work is not very helpful.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
That's Managed C++ syntax, not C++/CLI. It'll work directly in VS2003, but for 2005, you'll need to use the /clr:oldSyntax switch.
|
|
|
|
|
Hi all,
I'm trying to use a DLL compiled with VS2005 C++ with a .exe compiled in VC6, and although the .exe compiles and links with no problem, when I run it it crashes on trying to access the DLL.
Any ideas?
Steve.
Asynes yw brassa ages kwilkynyow.
|
|
|
|
|
viaduct wrote: Any ideas?
No but if you use your debugger, you'll have a lot more information of what's happening.
|
|
|
|
|
Erm, not sure if you're taking the piss there, but I had actually thought of that myself. The crash occurs at the end of a massive stack of system calls with only addresses and no function names, so there isn't much to go on.
Asynes yw brassa ages kwilkynyow.
|
|
|
|
|
Mmmh, one thing that comes to my mind: did you check if they are both linked to the same run-time library ? (single threaded, multi-threaded, ...)
|
|
|
|
|
To turn those addresses into function names, you need the debugging symbols for the OS. See here[^] for how to set up VS2005 to automatically grab the matching debugging symbols from a Microsoft web server, as required.
|
|
|
|
|
char *p= "test string";
p[5] = '_';
This code will fail. why?
My Assumption: "test string" remaining in memory as a constant pointer, hence it modifying teh same fails.
it would be helpful if you let me know how compiler handling such definitions and how it resides in memory
|
|
|
|
|
String literals are constant. For historical reasons you can use char * (when you really should only be able to use const char * ) in this case.
See here[^] to see what Microsoft has to say about this.
|
|
|
|
|
Sarath.<fon wrote:<="" div="">This code will fail. why?
It's the difference between arrays and pointers. Had you used the following, it would have worked:
char p[] = "test string";
p[5] = '_';
|
|
|
|
|
Just an FYI:
It is VERY bad to declare an array this way and then modify it. In this case, it won't hurt anything, but lets say you tried something like:
char p[] = "hello";<br />
p[5] = ',';<br />
p[6] = ' ';<br />
p[7] = 'W';<br />
p[8] = 'o';<br />
p[9] = 'r';<br />
p[10] = 'l';<br />
p[11] = 'd';
Now you have overwritten parts in memory that were not allocated for that string. With few exceptions, you should always specify a size for your arrays:
char p[30] = "hello, world!";
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|