示例#1
0
 void CreateBindCtx(out IBindCtx pbc)
 {
     System.Runtime.InteropServices.ComTypes.BIND_OPTS bo = new System.Runtime.InteropServices.ComTypes.BIND_OPTS() {
         cbStruct = Marshal.SizeOf(typeof(System.Runtime.InteropServices.ComTypes.BIND_OPTS)),
         dwTickCountDeadline = 0,
         grfFlags = 0,
         grfMode = STGM_CREATE
     };
     try {
         PInvoke.CreateBindCtx(0, out pbc);
         pbc.SetBindOptions(ref bo);
         pbc.RegisterObjectParam(STR_FILE_SYS_BIND_DATA, (IFileSystemBindData)this);
     }
     catch {
         pbc = null;
         throw;
     }
 }