acidsEcho
July 29th, 2010, 02:18 PM
Ive been tasked with implementing Visual Studio's SCCI interface into one of our inhouse tools. Currently we manually check out a file from source control (Surround SCM in this case), open the application, make adjustments through the tools GUI and save the file locally. My lead wants to eliminate that first step and have the tool automatically check-out the file when its opened. Just like visual studio does if you modify an unchecked-out (locked) file.
I haven't been able to find anything on the internet that can put me in the right direction on this. The MSDN documentation regarding MSSCCI isn't very clear. I did manage to build the example from the Feb 2005 VS SDK, but that only gave me enough information to confuse me more. It creates a DLL. How does that DLL link with Surround SCM? Once it is, where do these parameters come from to call the DLL functions?
For example:
SCCEXTERNC SCCRTN EXTFUN __cdecl SccInitialize(
LPVOID * ppContext,
HWND hWnd,
LPCSTR lpCallerName,
LPSTR lpSccName,
LPLONG lpSccCaps,
LPSTR lpAuxPathLabel,
LPLONG pnCheckoutCommentLen,
LPLONG pnCommentLen
)
In the test program I am using the sample in, I declare all those variables. But if I don't initialize the ones MSDN says are "out" parameters then I get:
Run-Time Check Failure #3 - The variable 'otherComLen' is being used without being initialized.
If I do initialize them then I get a handful of other errors that probably have something to do with me initializing them incorrectly since I have no idea what they are supposed to be.
Has anyone else tried this? Is it even possible? Does anyone have any kind of documentation, example, resource or information that will point me in the right direction? Ive been pulling my hair out over this one for a week now.
I haven't been able to find anything on the internet that can put me in the right direction on this. The MSDN documentation regarding MSSCCI isn't very clear. I did manage to build the example from the Feb 2005 VS SDK, but that only gave me enough information to confuse me more. It creates a DLL. How does that DLL link with Surround SCM? Once it is, where do these parameters come from to call the DLL functions?
For example:
SCCEXTERNC SCCRTN EXTFUN __cdecl SccInitialize(
LPVOID * ppContext,
HWND hWnd,
LPCSTR lpCallerName,
LPSTR lpSccName,
LPLONG lpSccCaps,
LPSTR lpAuxPathLabel,
LPLONG pnCheckoutCommentLen,
LPLONG pnCommentLen
)
In the test program I am using the sample in, I declare all those variables. But if I don't initialize the ones MSDN says are "out" parameters then I get:
Run-Time Check Failure #3 - The variable 'otherComLen' is being used without being initialized.
If I do initialize them then I get a handful of other errors that probably have something to do with me initializing them incorrectly since I have no idea what they are supposed to be.
Has anyone else tried this? Is it even possible? Does anyone have any kind of documentation, example, resource or information that will point me in the right direction? Ive been pulling my hair out over this one for a week now.