|
Hallo,
I have heard that in vs 6 has a tool by which i can see the code of a .DLL. Is it correct? Is there any other procedure, by which i can see the code of a dll?
|
|
|
|
|
Yes, with CPDMMRU* superpowers (or possibly asking for the DLL 's source code to the author).
(*) C odeP roject D ll's M aker M ind R eader U nit.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Shaheen.India wrote: which i can see the code of a .DLL
Do you want to find dependency??
Or you want IDL file ??
Regards,
Sandip.
|
|
|
|
|
SandipG wrote: Or you want IDL file ??
If there is one.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: If there is one.
Yes.
Regards,
Sandip.
|
|
|
|
|
Shaheen.India wrote: I have heard that in vs 6 has a tool by which i can see the code of a .DLL. Is it correct?
Who told this? I would like to meet him/her. May be the tool is hidden and nobody has ever discovered it.
Shaheen.India wrote: Is it correct
No.
Shaheen.India wrote: Is there any other procedure, by which i can see the code of a dll?
Buy/Beg for the source code.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Is it possible to truncate a file from its beginning?
Thank you masters!
|
|
|
|
|
No API to do this.
You will have to create a temporary file, copy the required contents, delete the original file and rename the temporary file.
Truncation at the end can be done using SetEndOfFile .
«_Superman_»
|
|
|
|
|
What about opening it as "always create new"?
- ns ami -
|
|
|
|
|
To display Ω i Message Box i m using Following code
CString str(_T("\x0x3A9"));
MessageBox(str);
And For Unicode Enable i am following these steps
Step 1: To Unicode enable a project in VC++: in the VC++ IDE, navigate to Project->Settings->C++, in the Preprocessor definitions section, insert WIN32,_DEBUG,_WINDOWS,_AFXDLL,_UNICODE, as normal MFC uses WIN32,_DEBUG,_WINDOWS,_AFXDLL,_MBCS.
Step 2: Navigate to the Link tab and select Output in the drop down list in the Category section, and specify wWinMainCRTStartup as the entry point for the program, in the Entry-point symbol edit box.
But After performing 2nd Step when i run project it show following error
Linking...
msvcrtd.lib(wcrtexew.obj) : error LNK2001: unresolved external symbol _wWinMain@16
Debug/Unicode_Dialog.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Plz help if anyone have solution for this.
|
|
|
|
|
To make the project Unicode enabled, navigate to Project->Settings->General and make the Character Set value as Use Unicode Character Set .
And then change your code to -
CString str;
str.Format(L"%c", 0x3A9);
MessageBox(str);
«_Superman_»
modified on Friday, January 30, 2009 2:58 AM
|
|
|
|
|
«_Superman_» wrote: str.Format(L"%c", 0x3A9);
Read this thread..Displaying Symbol issue[^]
I think toxcct is not around today
Regards,
Sandip.
|
|
|
|
|
SandipG wrote: I think toxcct is not around today
...thankfully...[^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
thanksfully, I had already given a working piece of code, which would have worked no matter unicode is enabled or not, and the OP would not be annoyed with his main :p
|
|
|
|
|
Your code doesn't compile, as it stands: you should at least include a pair of header files
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
obviously, but you're not trying to go on the road with me, so why should I argue on this anymore ?
|
|
|
|
|
Don't be upset. I was just kidding.
toxcct wrote: but you're not trying to go on the road with me
I miei amici ti hanno dato la mano,
li accompagno, il loro viaggio porta un po' più lontano
(F. De André )
(cheap translation: 'my friends said goodbye to you, I'm going to travel with them since their destination is further than yours')
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: Don't be upset. I was just kidding
ok
CPallini wrote: 'my friends said goodbye to you, I'm going to travel with them since their destination is further than yours'
so why should I take this ?
OT:
Carlo, sincerely, I have to tell you that I don't like how things have gone between us. I'm really sorry if I was too harsh and if you felt attacked last time we argued of this topic.
The thing is, I really trust that we, MVP, are not only there to give the first answer, but the best. When someone is asking for help, I'm doing my best to understand beyond the question what the OP is trying to do. That's why I don't automatically give a solution that would work, but which I think is not optimal.
I think you can understand this.
Sorry again for everything.
|
|
|
|
|
toxcct wrote: OT:
Carlo, sincerely, I have to tell you that I don't like how things have gone between us. I'm really sorry if I was too harsh and if you felt attacked last time we argued of this topic.
The thing is, I really trust that we, MVP, are not only there to give the first answer, but the best. When someone is asking for help, I'm doing my best to understand beyond the question what the OP is trying to do. That's why I don't automatically give a solution that would work, but which I think is not optimal.
I think you can understand this.
Sorry again for everything.
Don't worry, pal. I think anyone helps as he can or wish (this is possibly the 'philosophical' distance between us). I'm sorry if my humour was silly (as it probably was, I just can't resist).
The OP question shows that indeed you were right 'the last time'.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am, but tired of repeating myself again and again...
he should use _tmain() , CStringW and MessageBoxW() and no matter about the compiler config, but I believe you don't think the same, right ?
modified on Friday, January 30, 2009 8:08 AM
|
|
|
|
|
«_Superman_» wrote: str.Format(L"%c", 0x3A9);
this code is not very well designed, because it would not compile without UNICODE defined.
|
|
|
|
|
You're right. It would not compile without UNICODE defined.
Now why would you ever not want UNICODE defined?
«_Superman_»
|
|
|
|
|
«_Superman_» wrote: Now why would you ever not want UNICODE defined?
well, why not ? lol
seriously, I can't think of a good reason right now, but if it were never useful, why would this compilation mode still exist ?!
anyway, you can never predict what the others will do, so writing a "compiling-at-anytime" code is still prefered...
|
|
|
|
|
Initially I only used ASCII character sets.
A little later I started using the macros (_T, _tcs etc.) with the realization that people could compile this with and without UNICODE defined.
That went on for some years. But I never heard of anyone not defining UNICODE.
So now I only use L"" and the _w versions for the functions.
So probably the terminator will not have the option to not define UNICODE
Just as it is in Windows CE.
«_Superman_»
|
|
|
|
|
Let me try to make the things clear to you (obviously, it is not).
you want the character Omega( Ω ), which is a Unicode character. So if you want to store it in a string, you must allocate a Unicode String.
To do this, you are not obliged to have your whole project building in Unicode (with UNICODE and _UNICODE macros defined).
If you want to have a code that is dependant of the compilation mode (that mean, a code which you don't need to change anything to switch from Unicode to Ansi Build and vice versa), then you should use Generic Text Mappings (_T() macro, and such).
Using CString , _T() and MessageBox() is good most of the time, but here, this is not what you'd want exactly.
As you need a Unicode String, you have to use CStringW , and a literal string written with a prepended L (L"\x03A9" ).
And as MessageBox() gets a CString (and not a CStringW ), you have to adapt the call by using MessageBoxW() instead.
<font color="blue">void</font> main(<font color="blue">void</font>) { <font color="green">
CStringW str = L<font color="gray">"\x03A9"</font>;
MessageBoxW(str);
}
Is that much clear for you now ?
|
|
|
|