|
Hi!
My app crashes in this dll after I push my Exit button. Why? Blocked memory? ... I do nothing in the OnCancel function, just return to App class. And my app works right, no crashes.
|
|
|
|
|
Check the destructors of your objects. Also, when it crashes, click "Retry" to debug it, and get the call stack. You are likely to find where it crashes (even if it crashes in msvcrt, it is likely one of your objects that is faulty).
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
Hi!
I'm working with a multimedia app and I used PlaySound() function several times. It works fine, but when I close Windows 98, even 1 hour after testing my app, I get a MMTask.exe error in a white message dialog. Can anyone tell me why?
|
|
|
|
|
Hi,
Guys
I want that some of my folders are kept secured..
I mean that users are not able to open those
folders or Delete them
System : Win95 and Win98
Please help
Sameer
|
|
|
|
|
Hi,
In my application, I have to get the ID or the name of the process
that created a named mutex. Does anybody know how to proceed ?
I use this code :
HANDLE MutexHandle = ::OpenMutex(MUTEX_ALL_ACCESS, FALSE, MutexName);
if (MutexHandle)
{
// mutex exists
::CloseHandle(MutexHandle);
// how to get the process ID ?
}
else
{
// mutex doesn't exist
}
Thanks in advance,
Robin.
|
|
|
|
|
Hi,
this code will resolve your problem.
HANDLE m_hMutex = NULL;
// Create the mutex
m_hMutex = CreateMutex( NULL, FALSE, "Process.exe" );
// Check for errors
if ( GetLastError() == ERROR_ALREADY_EXISTS )
{
// Reset our mutext handle (just in case)
m_hMutex = NULL;
MessageBox(NULL,"Can't run the application twice!!!.","Task manager:",MB_OK);
exit(0);
}
Aizik Yair
Software Engineer
|
|
|
|
|
Why do you write "HBRUSH(COLOR_WINDOW+1)" instead of just "HBRUSH(COLOR_WINDOW)" to aquire a handle to the system brush that you want?
Best regards
biff
|
|
|
|
|
Because of this definition:
#define COLOR_SCROLLBAR 0
Windows needs a way to differentiate between COLOR_SCROLLBAR and NULL.
NULL means no background brush, and 1 or COLOR_SCROLLBAR + 1 means COLOR_SCROLLBAR.
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!
|
|
|
|
|
|
Does anybody have any info about implementation of CD/DVD emulation ?
|
|
|
|
|
iam working in the same project
so please if you got any usefull info or links
please send me
thank you
|
|
|
|
|
I need help regarding writing a dll
i need to call that dll in a vb 6.0 program .
what step i need to take in order to write that dll
i need to export class from that dll. i didnt use any support of MFC
Work Hard and Test your Luck
|
|
|
|
|
You could start by looking at MSDN. There is a lot of good tutorial style docs on what you're trying to do.
Also, if you use VC6 (not tried in 7), create a Win32 DLL project, somewhere theres an option to have the project "export some symbols". This default project it sets up exports a class in it's sample code.
jon
Signature space for rent. Apply Within.
|
|
|
|
|
thanx for the help
by the way i have July edition will it help me . one more thing i am not using MFC support and i need to export a class in my dll so if u could refer5 me any book also or a link i will be very greatfull to u
Work Hard and Test your Luck
|
|
|
|
|
Like Jon Hulatt said, if you create a new Win32 DLL in the appWizard when you create a new project, one of the options for you to choose is to create a DLL that exports some symbols. If you do this then you will have a shell of a DLL to start with that exports a global variable, a function, and a class with member functions.
Good Luck.
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!
|
|
|
|
|
thanx kilowatt
i don got ur point of "If you do this then you will have a shell of a DLL to start with that exports a global variable, a function, and a class with member functions" if u kindly explain it to me once again" .
i have a project thats working i need to convert it to dll so what step i could take . MSDN was alos not clear
pls help me if u can thanx for ur answer
Work Hard and Test your Luck
|
|
|
|
|
Please, tell me , how i can protect with the password access to the CD Drive ?
|
|
|
|
|
In vc++,I want to load a image file from a mapped network disk.
I want to know whether there are any authorization problems in accessing to a mapped network disk?
I can load the file from my local disk,but that program got failed when loading from a mapped network disk.
Thx ahead.
|
|
|
|
|
Did you receive any kind of file access error code?
Make sure you are using a path in this form:
//ComputerName/RemotePath/FileName
Also, make sure you have the remote path shared and having the correct access permissions. If you are using XP, you will have to setup Security permissions as well.
Like it or not, I'm right.
|
|
|
|
|
I have used that way before,and I can access to that disk driver in the explore so I have correct access permission.
When I use my ATL COM server to load a jpg in the localdisk,it works well.But
when I want to load it from a network disk driver,no matter which way I choose,(//ComputerName/RemotePath/FileName or mapped disk label),I got nothing.
|
|
|
|
|
Hi,
Look at the code below
#define MAKEINTRESOURCE(i) (LPTSTR) ((DWORD) ((WORD) (i)))
If it's a type casting, I feel it's terrible.
My question is: Inside memory, what the variable i look like after this terrible type casting
Any information concerned is appreciated.
Thank you
Best regard.
I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
|
|
|
|
|
The high word of 'i' will be cleared, since the WORD type cast will remove it.
The DWORD type adds a high word of zero's. The LPTSTR does just change the type of the DWORD to a character pointer, with no effects on the bits in memory.
|
|
|
|
|
Where's Christian?? He won't like that c-style cast one little bit
Signature space for rent. Apply Within.
|
|
|
|
|
If you dont try to modify the pointer returned from MAKEINTRESOURCE, things are okay.
Anyhow MSDN has this warning :-
"The return value from MAKEINTRESOURCE should be passed only to the Win32 resource-management functions"
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Yes, this is type casting.
Because the compiler verifies that all computations in your program use compatible datatypes, type casting becomes necessary when you have two data types in a calculation that are not compatible by default.
The MAKEINTRESOURCE macro is a very useful macro, that does serve a good purpose, and is not considered terrible. It allows you to refer to a resource in your module by either a NULL terminated string, or a resource ID.
This type of cast, where you place the target data type in ( ), is called a C-style cast. This is equivalent to the reinterpret_cast operator in C++. It tells the compiler to disregard the format of the data that you are type casting from, and think of it as another, possibly incompatible format.
So this type-cast operation does not change anything inside of memory, it just makes the compiler think of your type-cast variable as another format so that it will not complain that you are trying to form a calculation with two incompatible types.
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!
|
|
|
|