|
I guess both the dll is created by you. so
have your own function in the dll say DllGetLanguage
to identify which language it has been built.
I dont know for what purpose you want this detail.
|
|
|
|
|
SD3 wrote:
If I have a dll, how can I know if it's a C++ dll or C# dll ?
Are both of these written in a .NET language (ie Managed C++ or C#)?
You could try using ILDASM to open both files. If the one is just plain C++, then you won't be able to open it in ILDASM.exe . If it opens, then it is most likely in C# (correct me if I am wrong, but how many people actually use MC++?).
Also, I don't know of a function to do this programmatically.
Hope this helps,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
Thank you for the answer but the test with ildasm is failed. I have a project with dll developed in C++ and dll developed in C# (so for the compatibility I must use Managed C++). I must make a program (C++) that allow me to copy N dll from source directory to destination directory but if I have a C# dll I must put it in the Windows\Assembly (GAC) with the GAC Utility. So I search a safe method to distinguish dll C++ and dll C#.
Have you got some idea ?
Thank you for all
Andrea
|
|
|
|
|
To tell you the truth I have never tried this before but here is an idea. Write a few functions in C# and then write the exact same functions in C++. Compile the code and then dissassemble it. Try to see if you can spot any common patterns that will make you distinguish between C# and C++. On the other hand dissassemble the dll itself and check the functions that it calls. I have never dissassembled anything writen C# so I don't know what the code would look like, but you have to do your own spelunking.
// Afterall, I realized that even my comment lines have bugs
|
|
|
|
|
Dear Friends
With Style WS_THICKFRAME a Button Can be Resized,but I Want Only resizing behavior and not the thick frame.Pl Help Me.............
|
|
|
|
|
I have an SDI project which has a dialog. I want to write the code for one of the buttons (MyButton) in the dialog in CMyProjectDoc class. I can create the function by going to classwizard then selecting the CMyProjectDoc class and then MyButton BN_Click. And clearly I have a function for the button in CMyProjectDoc class (see below).
void CMyProjectDoc::OnMyButton() <br />
{<br />
COtherDlg dlg;<br />
dlg.DoModal();<br />
}
However, there is no communication apparent between the button and the function. That is, I click the button and nothing happens. Does anyone know why?
Thanks,
Ruben
|
|
|
|
|
Hi Ruben,
I have a few question
1. Why you need to Create DialogBox in Document Class?
Its always advice to separate Document and view (or
dialog) classes. You Can Move that code to CMainFrm class
or CMyProjectView Class.
2. How did you create OnMyButton function in CMyProjectDoc Class
using class wizard?. I think you can't assign Dialog box button event
to document Class.
Thanks,
Uma Mahes
|
|
|
|
|
one possible reason is that you have a handler for the same button in your view class.
|
|
|
|
|
Hello,
I'm struggling with the following problem; at my job here, we use a database of texts for easy translation in our apps. Inside the source, we put IDs, which look like this:
CString tmp = pLang->String(1005);
for instance. Now, this is impossible to read and inconvenient when editing someone else's source. My idea was to create something that would show a tooltip with the actual text when moving the cursor over the ID.
I tried to build a hook working with EM_CHARFROMPOS, EM_LINELENGTH and EM_GETLINE, to then feed it to a regexp and filter out the IDs. Problem is, the VC++ 6 source editbox reacts to none of these messages. I tried WM_GETTEXT, also no go.
My next try will be to create an actual VC++ 6 addin, but I have NO idea where to start. And before I spend another few hours for nothing, I would first like to know if it's even POSSIBLE to create an addin that would generate a tooltip on mouseover.
If anyone has an idea, I'd be glad to hear it.
Thanks,
- Fahr
|
|
|
|
|
I just installed SP5 for Visual Studio 6.0 and I still get a "Can not save file. File may be in use by another application." error almost every time I try to save the file, or when I compile the project. For instance, I modify a source file in the project. I save it. I save it again and I get the error. I save a 3rd time okay, 4th I get the error.
I'm running XP Pro on a Gateway laptop 512MB ram, and 10GB HD space remaining.
Signed,
Trying to save face_h
|
|
|
|
|
I'm sure like hell you have Norton Anti-virus installed on your machine, and you are using Win2000 or WinXP, am I right?
There are some severe conflicts between Norton anti-virus and VC++ 6.0 on Win2000/Xp, what happened to you is nothing, usually it could be much worse: your C++ files could be deleted by norton anti-virus from time to time with no valid reason, and there is no way to get back those deleted files. Be very careful, I would suggest you to stay away from Norton anti-virus if you are using VC++ 6.0 on Win2000/Xp.
So you have been warned.
|
|
|
|
|
I do have norton antivirus and this happens to me several times a day. Just hit the save button again and all is well.
John
|
|
|
|
|
Hi Bengi
Today I have gone through your article "Using TreeControl (TreeView) under Win32 API". It's a good article. But did you ever notice NM_RDBLCLK message ?
If you double click ( right mouse button ) on any item windows never send NM_RDBLCLK message. Windows sends all other message but not NM_RDBLCLK. This happens only for treeview control not for others. I have tested on NT4.
I think this is a microsoft bug. Also don't know any workaround. Do you have any idea ?
Thanks
Partha Kr. Chakraborti
|
|
|
|
|
According to MSDN (a great source for answers to these types of questions) a tree control does not send NM_RDBLCLK notifications. An easy work around is to write your own subclassed tree control and handle the WM_RBUTTONDBLCLK message and get it to send an NM_RDBLCLK notification yourself.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks for the reply.
But I can't find this info in MSDN. I have searched "www.msdn.microsoft.com". Could you pls send me the url.
Thanks
|
|
|
|
|
Hello,
I have a dialog based application and I have a custom control on it. I want to draw things in the custom control but outside of the OnPaint() function, something like:
void SomeFunc()<br />
{<br />
CPaintDC dc(this);<br />
.....<br />
......<br />
}
But this doesn't work. SO I think I've forgotten something but what ?? Any idea ?
Thanks
|
|
|
|
|
Ooops, sorry, I've forgotten to tell that the function is a member of my custom control class (of course )!
|
|
|
|
|
All drawing has to be done in OnPaint(). Any drawing done anywhere else will be erased whenever OnPaint() is called.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Yes I know, but let me explain my problem:
this custom control is in fact a 2D chart control. And I want to plot lines in it in a real-time mode (a point is plotted every 13 msec, so that's really fast). So, I don't want to redraw the complete control every time I add a point. In the OnPaint function, I draw the background (axes and grid) and I have a function (AddPoint), that draw directly on the screen with a transparent background everytime I receive a new point. The OnEraseBkgnd function has been overidden also: it does nothing.
So, OnPaint is just called when the control needs to be redrawn and in this function, I redraw also the complete lines. But this function is normally called only once at start and when, for example, a part of the control has been hidden by another window.
So, if I draw in the AddPoint function, why isn't it working? Is there a call to the OnPaint function ???
Thanks
|
|
|
|
|
cedric moonen wrote:
Is there a call to the OnPaint function ???
Add a line MessageBeep(1); at the start of OnPaint() and you will get a beep every time OnPaint() is called.
I took a closer look at your problem, and I believe it stems from your using CPaintDC. You should be using CClientDC instead. CPaintDC should only be used in OnPaint().
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks a lot !!
That works fine with CClientDC
This solves a lot of problems !
|
|
|
|
|
Glad I could help
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
i derived a dialog class named "CDlgBase" from CDialog,and then derived a
dialog class named "CDlgLogon" from "CDlgBase".
When i use the following to show CDlgLogon,the dialog showed on the screen is
CDlgBase instead of CDlgLogon. What' wrong with the code?
.....
CDlgLogon dlg;
dlg.DoModal();
.....
gucy
|
|
|
|
|
in the CDlgLogon class constructor, are you passing the dialog template ID to the CDlgBase class constructor so that it can pass it on to CDialog? I think not!
CDlgBase::CDlgBase (UINT IDD, CWnd* pParent)
: CDialog (IDD, pParent)
{
...
}
CDlgLogon::CDlgLogon(CWnd* pParent)
: CDlgBase(CDlgLogon::IDD, pParent)
{
...
}
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
yes.i does not.
and thanks a lot!
gucy
|
|
|
|