Integrate sourcesafe into your own tools

Source: Internet
Author: User
There is an application system in the work. All its data is stored in the database and maintained using a tool. In actual use, we hope to implement Version Control on some data. We believe you may encounter this kind of requirement.

The easiest way is to first import data into a file and then manually add it to sourcesafe, and vice versa. This can indeed achieve the goal, but it needs to be explicitly "transitioned" in the middle. This is obviously a bit awkward. Why can't we integrate sourcesafe into our tools like? So we have this article ......

After a while, I found Microsoft sourcesafe 6.0 Type Library, such:

 

There is nothing to say next.CodeTest it! The test code has implemented some basic features of VSS. The code itself is nothing more than opening a vssdatabase and then operating vssitem. You can see the code by yourself, the only thing that needs to be noted is the enumerated values of vssflags. The following is my own result. It is not guaranteed that it is correct. Please let me know if anyone has any official problems!

Download: vssdemo.zip

The following table describes the enumerated values of vssflags:

Public Enum vssflags {vssflag_binbinary = 2097152; // file-type: binaryvssflag_bintest = 1048576; // file-type: Auto-detectVSSFLAG_BINTEXT = 3145728; // file-type: textvssflag_chkexclusiveno = 536870912; // multiple-checkouts: Not Allowed = 268435456; // multiple-checkouts: allowed = 1536; // difference: vssflag_cmpfail = 2048; vssflag_cmpfull = 512; vssflag_cmptime = 1024; vssflag_delno = 262144; // remove-Local: novssflag_delyes = 524288; // remove-Local: yesvssflag_deltano = 8388608; // store-Latest: yesvssflag_deltayes = 4194304; // store-latest: novssflag_eolcr = 16; // New-line: crvssflag_eolcrlf = 48; // New-line: crlfvssflag_eollf = 32; // New-line: records = 16384; // build-tree: novssflag_forcediryes = 32768; // build-tree: yesvssflag_getno = 134217728; // get-local-copy: novssflag_getyes = 67108864; // get-local-copy: yesvssflag_histignorefiles = 1073741824; // history include-file: yesvssflag_keepno = 65536; // keep-checkout: novssflag_keepyes = 131072; // keep-checkout: Disabled = 4096; // recursive: novssflag_recursyes = 8192; // recursive: yesvssflag_delnoreplace = 786432; // local-copy: leavevssflag_repask = 64; // local-copy (writable): bytes = 256; // local-copy (writable ): mergevssflag_repreplace = 128; // local-copy: bytes = 192; // local-copy (writable): sk1_ssflag_timemod = 8; // set-file-time: modificationvssflag_timenow = 4; // set-file-time: currentvssflag_timeupd = 12; // set-file-time: Check invssflag_updask = 16777216; // checkin-unchanged-Files: askvssflag_updunch = 50331648; // checkin-unchanged-Files: Undo check outvssflag_updupdate = 33554432; // checkin-unchanged-Files: Check invssflag_userrono = 1; vssflag_userroyes = 2 ;}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.