unresolved external symbol “wchar_t * __stdcall _com_util::ConvertStringToBSTR

If you link code found some error like bellow:

error LNK2019: unresolved external symbol "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z) referenced in function "public: __thiscall _bstr_t::Data_t::Data_t(char const *)" ([??0Data_t@_bstr_t@@QAE@PBD@Z](mailto:??0Data_t@_bstr_t@@QAE@PBD@Z)) > >

Solve:

Try to link “comsuppwd.lib” in debug AdditionalDependencies. Link “comsuppw.lib” in release AdditionalDependencies.

Reference:

  1. http://msdn2.microsoft.com/en-us/library/t58y75c0.aspx

  2. http://www3.ccw.com.cn/club/essence/200103/532.htm

可愛的小黑人面紙套

Jenny 之前買給我的~~~蠻可愛的~~

IMAGE_00049.jpg IMAGE_00050.jpg IMAGE_00051.jpg

Remote debug in VS2005

Reference:

  1. Follow the reference for necessary configuration on local project and remote machine’s network settings.
  2. Install the debug package on the remote machine and launch the debug monitor. Under the installation diretory Microsoft Visual Studio 2005vsRemote Debuggerx86
  3. Startup “Visual Studio 2005 Remote Debugger”, and use “No Authentication”(Naive only).

  4. Copy follow folders from local machine if needed.
    C:WINDOWSWinSxSManifestsx86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c.cat
    C:WINDOWSWinSxSManifestsx86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c.manifest
    C:WINDOWSWinSxSManifestsx86_Microsoft.VC80.DebugMFC_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_c8452471.cat
    C:WINDOWSWinSxSManifestsx86_Microsoft.VC80.DebugMFC_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_c8452471.manifest
    C:WINDOWSWinSxSManifestsx86_Microsoft.VC80.DebugOpenMP_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_66b81908.cat
    C:WINDOWSWinSxSManifestsx86_Microsoft.VC80.DebugOpenMP_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_66b81908.manifest
    C:WINDOWSWinSxSPoliciesx86_policy.8.0.Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_x-ww_09e017b4
    C:WINDOWSWinSxSPoliciesx86_policy.8.0.Microsoft.VC80.DebugMFC_1fc8b3b9a1e18e3b_x-ww_a193936f
    C:WINDOWSWinSxSPoliciesx86_policy.8.0.Microsoft.VC80.DebugOpenMP_1fc8b3b9a1e18e3b_x-ww_6afafa78
    C:WINDOWSWinSxSx86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c
    C:WINDOWSWinSxSx86_Microsoft.VC80.DebugMFC_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_c8452471
    C:WINDOWSWinSxSx86_Microsoft.VC80.DebugOpenMP_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_66b81908
  5. Copy your debug code in debug machine.
  6.  Change your project setting as follow.

DllRegisterServer/DllUnregisterServer failed in 0×80029C4A (TYPE_E_CANTLOADLIBRARY)

**SYMPTOMS
**When you try to register or unregister a COM server, it will pop failed in 0x80029C4A (TYPE_E_CANTLOADLIBRARY).

**CAUSE
**This is cuase by no TLB or missing TLB of this COM DLL. 

**RESOLUTION
**If your COM DLL is builded using /notlb. remember use
     CComModule::RgisterServer(FALSE);
     CComModule::DllUnregisterServer(FALSE);

otherwise, please make sure your TLB is well for register.

REFERENCE

CComModule::RegisterServer; CComModule::UnregisterServer

How to register COM DLL when UAC is on under vista

UAC (User Account Control)  is complicate as I disussed before. Even you are a “Administrators” (Yes~~ it has ‘s’, in Vista you only have one “Administrator” but much “Administrators”), you can not register the COM component. There is a way to tell you how to work it out!!

  1. Write a batch file “regsvr32 foo.dll” and use right click “Run as administrator”.
  2. Open Programs–>Accessories–>Command Prompt.   (right click “Run as administrator”.)

Such you can register your COM component, or you can use “Administrator” account (it will be disable by default, just go to “Manage–>Local Users and Groups–> Users” to open it.

MT調教~擋住所有的TrackBack

關於MT的技術

雖然很不容易的把SCode安裝完整,總算擋住了之前蜂擁而上的迴響。但是由於MT-Blacklist關閉的原因~使得垃圾的Trackback如潮水般的襲來~~ 沒辦法了~ 只好去網路上找尋一些的解決方法~ 總算找到了這個MTDisguiseTrackbackURL 。他的運作機制也很簡單,就是利用java script 去把你原來的引用切成了許多的小片段~ 讓SPAM無法正常的運作~~安裝方式如下:

  1. 下載0.5版的MTDisguiseTrackbackURL
  2. 解壓縮在你的plugin目錄底下
  3. 這樣就可以了~ 如果你跟我一樣每篇都有的話~ 可能需要重建所有的頁面就可以了~

直接看可能看不出有什麼不同,但是當你去檢視原始碼的時候~你就會發現有所不同了~~~

參考資料: