|
Thanks for the tip.
Couldn't find any equivalent to depends in VC++ .NET so just out of curiosity I tried using the 6.0 version on both dlls (6.0 and .NET versions).
depends shows the three exported functions in the 6.0 version of the dll, but not in the .NET version.
In all other respects, the depends display appeared to be the same (apart from the linker version used to build the dll (6.0 vs 7.0)
This display would seem to suggest that the .NET version is not really exporting any functions and therefore does not deal with .def files in the same way as VC++ 6.0
|
|
|
|
|
Since my last reply regarding the use of depends, I went back into VC++ .NET and looked up the use of .def files
It appears that to just add the .def file to the project is not enough, one must also go to project properties and specify the .def file in the
"Linker->Input->Module Definition File" property
I did this, and now the dll generated by VC++ .NET works
Many thanks for your very useful help
|
|
|
|
|
>>Many thanks for your very useful help
You're welcome
|
|
|
|
|
I have a subclass of CListCtrl called CEditListCtrl, a piece of undocumented legacy code. This somehow causes the function CListCtrl::EnsureVisible not to function (i.e. nothing happens when it is called).
Could someone give me some leads as to what is causing this?
I also committed the crime of posting a programming question in the Lounge.
|
|
|
|
|
I'm trying to use afxDump to dump the contents of my object in the debug window like this:
#ifdef _DEBUG
afxDump.SetDepth(5);
afxDump << &m_mapStrings << "\n";
#endif Where m_mapStrings is defined as:
typedef CMap<int, int, CString*, CString*&> CMapIntToCString;
CMapIntToCString m_mapStrings;
But the debug window is displaying:
a CObject at $6595C2C
with 3 elements
[] =
[] =
[] = So I can't actually see what's in the object, but I know something is, because I can get the data out! Does anyone know what I'm doing wrong, or how I can get to see the contents of this object? Yeah, I can use my classes methods to iterate through the map and dump the objects, but I'd like to know what I'm doing wrong with the afxDump...
Dylan Kenneally
London, UK
|
|
|
|
|
Hello,
Not sure if this question belongs here...
I have a web server (a service) that acts as a proxy to translate web pages from English to Swedish.
In order for this to work, I need to set the appropriate values of proxy server and port and activate "Use a proxy server" in IE->Internet Options->Connections->LAN Settings->Advanced.
Now, activating and deactivating frequently will become a pain in the ass jumping to the options dialog all the time, so I figured I could create an IE toolbar button that would do this programmatically.
This turned out to be more complicated than I thought... I can change the options programmatically (at IE runtime) but the changes don't seem to be reflected appropriately. I was trying to simulate the [de]activation behaviour of IE when doing it manually, but something seems to be missing.
Manually my proxy kicks in just fine, but not programmtically... all options are set and visually it all looks fine.
Has somebody dealt with this or does anyone know how to do this?
ANy pointers to material on this would be appreciated,
TIA,
/Tommy
|
|
|
|
|
Tommy Svensson wrote:
Has somebody dealt with this or does anyone know how to do this?
what exactly are you changing??? Are you just setting the value in teh registry or are you going about it a different way?
"When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks]
"It's The Soapbox; topics are optional" Shog 9
|
|
|
|
|
Brian Delahunty wrote:
what exactly are you changing??? Are you just setting the value in teh registry or are you going about it a different way?
I'm changing the values (ProxyServer and ProxyEnable) in the registry (HKCU/Soft/MS/Windows/CurrentWindows/Internet Settings). To be sure things are really changed I'm also calling InternetQueryOption and InternetSetOption with values set from the registry.
The reg settings are notified to IE through
SendNotifyMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0x1F,
reinterpret_cast<LPARAM>(_T("Software\\Microsoft\\Internet Explorer")));
But this doesn't seem to be sufficient. Maybe I need to tell IE (or someone else) about these changes in a different way?
Ohhhh, I really REALLY need this to function!
Thx,
/Tommy
|
|
|
|
|
The work around would be to make the change and then launch a new browser instance with your current URL and close the existing instance.
You might try something like COMspy to see what the IE container is doing when you hit apply. Somehow it must be causing IE to re-init without closing down. BTW its the container that's doing the action and not the IE control which is being hosted.
Todd Smith
|
|
|
|
|
Here's the answer... FINALLY!!!
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/wininet/tutorials/options.asp
And now it all works! Thx to all who have helped out!
/Tommy
|
|
|
|
|
I would like to initialize my static const variables as part of the declaration in the header (I am using VS7) - this seems to work fine for ints, but not for LPCTSTRs. For example:
class CFoo
{
static const int m_nStatic = 1; // This works
static const LPCTSTR m_pszStatic = _T("Hello, world!"); // This fails
static const char* m_pszStatic2 = "Test"; // This fails
};
In the above sample, I get the following errors when attempting to initialise the strings:
error C2864: 'm_psz...' : only const static integral data members can be initialized inside a class or struct
Obviously I can initialize the static strings outside of the class, i.e.:
LPCTSTR::CFoo m_pszStatic = _T("Hello, world!");
But I have always found this method cumbersome. I am a big fan of Scott Meyers Effective C++ book(s) and he cites example code that will initialise strings in the class declaration so could this be an MS compiler-ism? Perhaps there is a pragma?
Phew, for a minute there I lost myself.
|
|
|
|
|
Robert Edward Caldecott wrote:
could this be an MS compiler-ism?
Don't think so. Here's what Holy Book of C++ Standard says in 9.2, paragraph 4:
"A member-declarator can contain a constant-initializer only if it declares a static member (9.4) of integral or enumeration type"
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
OK. I have found I can initialize strings in the header and use the new MS __declspec(selectany) attribute to avoid errors if the header is included elsewhere in the project:
class CFoo<br />
{<br />
static LPCTSTR s_psz;<br />
...<br />
};<br />
<br />
__declspec(selectany) LPCTSTR CFoo::s_psz = _T("Yeeha");
This will have to do.
Faith. Believing in something you *know* isn't true.
|
|
|
|
|
I have developed a chat application and now I want to integrate voice chat in my application...but I have no idea how to start...can anybody help me in doing this?
Thanks in advance
Deepesh
|
|
|
|
|
Example : http://www.codeproject.com/internet/voicechat.asp
Donno if its good enough but u can try it.
U can achieve the same with directX
|
|
|
|
|
I have already gone through that code but I am still not able to understand the concept that how to implement it.
Anyway thanks for the reply..if you have some idea then plz tell me.
Deepesh
|
|
|
|
|
http://www.codeproject.com/internet/voicechat.asp[^] Might help you out
"When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks]
"It's The Soapbox; topics are optional" Shog 9
|
|
|
|
|
Do you know what Socket Notification Sink is ?
Sometimes, when my applications crashes, the message box that shows the fatal error has Socket Notification Sink as the title. When I run Spy++ and look at windows, under my app process is
Socket Notification Sink member....???
Thanks.
Celebrate Mr. Cesilko!
|
|
|
|
|
I've started a workspace without winsock support, but now, few weeks later, I want to add it.
Is it still possible, and how do I do it?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Project -> Add to project -> Components and Controls
and you'll find Windows sockets under C++ components. This is the easiest way in your case.
|
|
|
|
|
tnx
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Hi,
when is the last reliable possibility to send data to another application at the end of the program ? Destructor of FrameWnd, or destructor of CWinApp ??
Thanks
Celebrate Mr. Cesilko!
|
|
|
|
|
CYourApp d'tor will be called after frame window is destroyed, because application object is global and frame window is created dynamically.
Of course, when application destructor is invoked you don't have any documents/views/frames.
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
Going through some files from another programmer, I found that he always put a using namespace std; in his public headers. Trying to limit the scope of the using I tried to move the using clause inside the class declaration
class C
{
using namespace std;
}; but it results in a compilation error on VC6.0 sp5. But it shouldn't!? Anyone have an idea here?
(I finally qualified every single item from the std namspace.)
|
|
|
|
|
Niklas Lindquist wrote:
But it shouldn't!?
Why?
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|