Hi all! I have two network connections, both of which have the same destination address - the only thing that distinguishes them is the interface. I also have two processes: process 1 may only use connection 1, and process 2 may only use connection 2. Is there any way I can ensure that my outbound socket connects via a particular interface? I can't leave it to windows to decide which way to route the connections. Any help would be greatly appreciated! Thanks, Gary
Gary Chapman
Posts
-
binding a socket to a particular interface? -
Syncing a single VSS database across several machinesI should have been more specific. Ideally I want to run VSS on the laptop so I can do several days of development (including being able to undo checkouts when I really screw things up) between syncs. Gary
-
Syncing a single VSS database across several machinesHi all, I'm a home-based developer who has a single desktop machine with Visual SourceSafe 6 installed. I recently purchased a notebook. I'd like to know how can I share a single codebase between the 2 computers, considering that they will not always be connected to each other. i.e. I want to be able to sync both machines, take my notebook offsite, make various code changes to the notebook's VSS database, and later reconnect the 2 machines and sync the changes with my desktop machine's VSS database. Can I use XP Pro's Offline Files capabilities to keep both versions in sync? Is it safe to just sync the files under VSS\data? Does anyone have any alternative suggestions or caveats? Many thanks, Gary
-
Syncing a single VSS database across several machinesHi all, I'm a home-based developer who has a single desktop machine with Visual SourceSafe 6 installed. I recently purchased a notebook. I'd like to know how can I share a single codebase between the 2 computers, considering that they will not always be connected to each other. i.e. I want to be able to sync both machines, take my notebook offsite, make various code changes to the notebook's VSS database, and later reconnect the 2 machines and sync the changes with my desktop machine's VSS database. Can I use XP Pro's Offline Files capabilities to keep both versions in sync? Is it safe to just sync the files under VSS\data? Does anyone have any alternative suggestions or caveats? Many thanks, Gary
-
Delphi creates empty propput procedures when it imports my DLLI have an ATL/MFC COM DLL which a customer is trying to use from Delphi 6 Enterprise SP2. He was having trouble setting properties, and eventually discovered that all of the Set_* procedures in the auto-generated TLB file are empty. The only ones that aren't empty are for BSTR properties. We have no problems using the DLL from C++, VB or ASP. Has anybody experienced something like this? Am i missing a MIDL keyword? Is it a build/linker setting? Do I need to specify something in my .DEF file? Or is Delphi to blame? --- Here's how things are defined in my project: // from my .idl file [propput, helpstring ("blah"), id(6)] HRESULT RepeatCount([in] long newVal); // from the corresponding .h file STDMETHOD(put_RepeatCount)(/*[in]*/ long newVal); // from the corresponding .cpp file STDMETHODIMP CMyClass::put_RepeatCount(long newVal) { AFX_MANAGE_STATE(AfxGetStaticModuleState()) m_lRepeatCount = newVal; return S_OK; } // from Delphi's auto-generated MyDLL_TLB.BAS procedure TMyClass.Set_RepeatCount(pVal: Integer); begin Exit; end; --- Thanks, Gary
-
Integrating latest MSDN with VC++ 6.0Hi all, I recently installed Visual Studio 6.0, followed by the January 2004 edition of MSDN. Unfortunately MSDN did not integrate itself with VC++ or VB. I'm assuming that MSDN is designed to be used with VStudio .Net, but is there any way I can hook it into 6.0? At the moment I just get a popup telling me "The MSDN collection does not exist. Please reinstall MSDN." Thanks, Gary
-
Programatically interrogating a C/C++ enumeration?If I have, say:
typedef enum { val1 = 0, val2 = 1, val3 = 5 } MyEnum;
Is there any programatic way I can find out how many constants MyEnum contains, what their highest and lowest values are, etc? I assume not, but I live in hope :-D -
How do I determine if a certain method exists on an interface?I have a COM DLL written in C++/ATL. I added a new method to one of the interfaces and altered my testbed to call this new method. I then went and registered an earlier version of the DLL which doesn't contain the new method. Not surprisingly, an exception is raised when the testbed tries to call the method. I can catch this with a try/catch handler, but I still get an unrecoverable exception when the calling function exits (see code snippet below). Is there anyway of interrogating the interface to see if the method exists? If not, is there I way my app can continue to run gracefully? This final 0xC0000005 exception is a bit of a showstopper. Thanks, Gary --- void func() { ::CoInitialize(NULL); try { CComPtr MyInt; MyInt.CoCreateInstance(CLSID_MyInterface); MyInt->NewMethod(); } catch(...) { AfxMessageBox("eek"); } } // exception 0xC0000005 thrown here