Category Archives: 技术开发

windows GUI、c++、图形图像等

delete all history of one file with sensitive data

一个命令一个命令的敲吧。这个试过是可以work的,记下来, 以备需要。 步骤一: 从你的资料库中清除文件 以Windows下为例(Linux类似), 打开项目的Git Bash,使用命令:  git filter-branch –force –index-filter ‘git rm –cached –ignore-unmatch path-to-your-remove-file’ –prune-empty –tag-name-filter cat — –all 其中, path-to-your-remove-file 就是你要删除的文件的相对路径(相对于git仓库的跟目录), 替换成你要删除的文件即可. 如果你要删除的文件很多, 可以写进一个.sh文件批量执行, 如果文件或路径里有中文, 由于MinGW或CygWin对中文路径设置比较麻烦, 你可以使用通配符*号, 例如: sound/music_*.mp3, 这样就把sound目录下以music_开头的mp3文件都删除了. 例如这样, del-music-mp3.sh: #!/bin/bash # git filter-branch –force –index-filter ‘git rm –cached … Continue reading

Posted in 技术开发 | 2 Comments

学习下 WTL 的 thunk-转载的,写的很好

学习下 WTL 的 thunk 由于 C++ 成员函数的调用机制问题,对C语言回调函数的 C++ 封装是件比较棘手的事。为了保持C++对象的独立性,理想情况是将回调函数设置到成员函数,而一般的回调函数格式通常是普通的C函数,尤其是 Windows API 中的。好在有些回调函数中留出了一个额外参数,这样便可以由这个通道将 this 指针传入。比如线程函数的定义为: typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(    LPVOID lpThreadParameter    );typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE; 这样,当我们实现线程类的时候,就可以: class Thread{private:    HANDLE m_hThread; public:    BOOL Create()    {        m_hThread = CreateThread(NULL, 0, StaticThreadProc, (LPVOID)this, 0, NULL);        … Continue reading

Posted in 技术开发 | Leave a comment

Unit Testing

http://artofunittesting.com/definition-of-a-unit-test/   A good unit test is: §  Able to be fully automated §  Has full control over all the pieces running (Use mocks or stubs to achieve this isolation when needed) §  Can be run in any order  if part of many … Continue reading

Posted in 技术开发 | Comments Off on Unit Testing

ATL::CRegKey trick

please pay attention on REGSAM. HKEY m_hKey;     REGSAM m_samWOW64;   NND, default is HKEY_READ | HKEY_WRITE, so you understood.

Posted in 技术开发 | Tagged | 1 Comment

Buy accutane online reddit

Good to find below article about windows security such as SID, ACE, DCL etc. https://msdn.microsoft.com/en-US/library/46z2w9kb(v=vs.80).aspx Just download that tand building with VS2008. Enjoy!

Posted in 技术开发 | Tagged , | Comments Off on Windows Security programming sample