WM n久以前寫的ConnMgr類

2022-01-11 10:16:17 字數 2968 閱讀 6032

說明: 星期天回去看了一下,能編譯通過了(汗).

標頭檔案: connectionmgr.h

#pragma once

#include #include #include #include #pragma comment( lib, "cellcore.lib" )

#include class connectionmgr

;

實現: connectionmgr.cpp

另外還有c api,供c# p/invoke:

connectionmgr_c.h

#pragma once

#define export __declspec(dllexport)

#include "connectionmgr.h"

#include static connectionmgr g_mgr;

static std::vectorlst;

extern "c"

export bool establishdefaultnet(bool issync)

export bool establishdefaultwap(bool issync)

export bool establishusename(wchar_t* entrypointname,bool issync)

export bool establishuseindex(int index,bool issync)

export bool establishuseguid(guid guid,bool issync)

export size_t getnetindentifierssize()

export const wchar_t* getindentifierdescription(size_t index)

export void releaseidentifierlist(wchar_t** pstrings)

export void releasecurrentconnection()

};

ps:

releaseconnection能否正常斷網看你的機器對connmgr實現的標準程度,在wm 5中,releaseconnection的引數是bcache,只有兩種狀態;在wm 6中,那個引數換成了lcache,document裡面說lcache>1,那麼快取lcache秒之後斷網,但是好像很多機器都不是那麼實現.如果不能工作的話,就需要用pknife的ras辦法斷網了.....

以前寫的文字 隨感

你走了 你走了,離我而去,只能模糊地看著你消失的背影,我悵然若失地抱頭思憶著過去有你的歲月,是溫馨 是浪漫。於是我抬腿想去把你追回,你卻消失在視線的盡頭。留下獨自的我,久久地矗立在風中,把淚揮灑,綿綿的絲於風中惆悵,恨自己沒有把你留住 恨自己太笨 太傻 只是你的心,我卻永遠沒有猜透,或許是不敢猜透吧...

C 很久以前寫的埠掃瞄工具

using system using system.collections.generic using system.componentmodel using system.data using system.drawing using system.text using system.window...

以前寫的乙個VB倉存管理系統(三)

先安裝sql資料庫,然後把壓縮包裡backup目錄下的mydb資料庫檔案附加到資料庫中,按照以下方法修改sa密碼為790823,系統使用者的密碼 阿零111,阿香333,其他兩個222,他們的許可權不同,請朋友們自己對比。1 開啟企業管理器,依次展開伺服器組,然後展開伺服器。2 開啟 安全性 資料夾...