1,Open “OLE/COM object viewer” from Tool menu of VC6.
2,Find “Microsoft VBScript Regular Expressions 5.5” under “Type Libraries”.
3, Double click the node to open with “ITypeLib Viewer”.
4, Choose “Save As” and save as “vbscript.IDL”.
5, Run “midl vbscript.idl” in Command Propmt. midl.exe is typically located under “C:\Program Files\Microsoft Visual Studio\VC98\Bin”.
This creates “vbscript.tlb”.
6, Move this file into your VC6’s project directory.
7, By coding #import “vbscript.tlb” in your source file, VB regex will be available.
#include "stdafx.h"
#import "vbscript.tlb" no_namespace named_guids
_bstr_t vbregReplace(LPCTSTR source,
LPCTSTR replace,
LPCTSTR regex,
BOOL bGlobal,
BOOL bCaseInsensitive)
{
IRegExpPtr pReg;
pReg.CreateInstance(CLSID_RegExp);
_bstr_t bstrSource(source);
_bstr_t bstrReplace(replace);
_bstr_t bstrRegex(regex);
pReg->put_Global(bGlobal?VARIANT_TRUE:VARIANT_FALSE);
pReg->put_IgnoreCase(bCaseInsensitive?VARIANT_TRUE:VARIANT_FALSE);
pReg->put_Pattern(bstrRegex);
_bstr_t bstrRet = pReg->Replace(bstrSource, bstrReplace);
return bstrRet;
}
int main(int argc, char* argv[])
{
CoInitialize(NULL);
_bstr_t t = vbregReplace(
"abcdefg",
"x",
"[aceg]",
TRUE,
TRUE);
puts(t);
CoUninitialize();
return 0;
}
In current Internet environment, every PC is assigned a private IP. If global IP is…
__file__ is the script file itself. From python3.9 above, it is an absolute path, otherwise…
You need to clear these two flags IMF_DUALFONT and IMF_AUTOFONT to keep font unchanged.
I don't know what is going wrong but... How to fix it Open the solution…
Create a break point that hits when CreateProcess was called Enter a Function Breakpoint Enter…