vb×Ô¶¯¹Ø»ú³ÌÐò
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Const EWX_LOGOFF = 0
Private Const EWX_SHUTDOWN = 1
Private Const EWX_REBOOT = 2
Private Const EWX_FORCE = 4
Private closeTime As String
Sub AdjustTokenPrivilegesForNT()
Dim hdlProcessHandle As Long
Dim hdlTokenHandle As Long
Dim tmpLuid As LUID
Dim tkp As TOKEN_PRIVILEGES
Dim tkpNewButIgnored As TOKEN_PRIVILEGES
Dim lBufferNeeded As Long
hdlProcessHandle = GetCurrentProcess()
OpenProcessToken hdlProcessHandle, (TOKEN_ADJUST_PRIVILEGES Or _
TOKEN_QUERY), hdlTokenHandle
LookupPrivilegeValue "", "SeShutdownPrivilege", tmpLuid
tkp.PrivilegeCount = 1
tkp.Privileges(0).pLuid = tmpLuid
tkp.Privileges(0).Attributes = SE_PRIVILEGE_ENABLED
AdjustTokenPrivileges hdlTokenHandle, False, tkp, _
Len(tkpNewButIgnored), tkpNewButIgnored, _
lBufferNeeded
End Sub
Private Sub Form_Load()
Dim fso As New FileSystemObject
Dim ts As TextStream
Dim txt, iniFilePath As String
iniFilePath = App.Path & "\" & "system.ini"
If fso.FileExists(iniFilePath) Then
Set ts = fso.OpenTextFile(App.Path & "\" & "system.ini")
closeTime = ts.ReadLine
ts.Close
Set ts = Nothing
If Len(Trim(closeTime)) = 0 Then
Set ts = fso.CreateT
Ïà¹ØÎĵµ£º
VB´´½¨ACCESSÊý¾Ý¿âÈ«½â ¶¯Ì¬´´½¨Êý¾Ý¿â¡¢´´½¨±í£¬´´½¨¼Ç¼ ADO¡¢ADOX2009Äê04ÔÂ20ÈÕ ÐÇÆÚÒ» 10:17ÕªÒª£º ±¾ÎIJûÊöÁËÔÚVB³ÌÐòÖÐÀûÓÃADO¶ÔÏó¶¯Ì¬´´½¨Êý¾Ý¿âºÍÊý¾Ý±íµÄ·½·¨£¬ÕâЩ·½·¨ÔÚ¿ª·¢VBÊý¾Ý¿âÓ¦ÓóÌÐòÖкÜÓÐʵÓüÛÖµ£¬Ëü¿ÉÒÔÌá¸ßÊý¾Ý¿â³ÌÐòÁé»îÐÔ¡£
¡¡¡¡¹Ø¼ü´Ê£ºÊý¾Ý¿â¡¢Êý¾Ý±í¡¢ADO¡¢ADOX
¡¡¡¡1: ÎÊÌâµÄÌá³ö
¡¡¡¡Ô ......
½ñÌìÏëÒª×öÀàËÆ½ðɽ´Ê°ÔÆÁĻȡ´ÊµÄ¹¦ÄÜ£¬ÔÚÍøÉÏÕÒÁËһЩ×ÊÁÏ£¬·¢ÏÖ¶¼ºÜ¸´ÔÓ¡£¼ÈÈ»½ðɽ´Ê°ÔÒѾʵ
ÏÖÁË£¬½èÓÃÖ®:
½ðɽ´Ê°ÔÖÐ2005ÖдøÁËÒ»¸öXdictGrb.dll£¬ÆäʵÊÇÒ»¸öCOM×é¼þ£¬²¢ÇÒʵÏÖÁËÒ»¸öÈ¡´ÊµÄ²å¼þ¿ò¼Ü¡£
ÆäÖеÄÓÐÒÔÏÂÄÚÈÝ£º
1 ½Ó¿Ú
1.1 GrabProxy È¡´Ê´úÀí¶ÔÏó
Function AdviseGrab(XDictGrabSink As IXDictGra ......
VBÖÐ Replace º¯Êý
ÃèÊö
·µ»Ø×Ö·û´®£¬ÆäÖÐÖ¸¶¨ÊýÄ¿µÄij×Ó×Ö·û´®±»Ì滻ΪÁíÒ»¸ö×Ó×Ö·û´®¡£
Óï·¨
Replace(expression, find, replacewith[, compare[, count[, start]]])
Replace º¯ÊýµÄÓï·¨ÓÐÒÔϲÎÊý£º
²ÎÊý ÃèÊö
expression ±ØÑ¡¡£×Ö·û´®±í´ïʽ£¬°üº¬ÒªÌæ»»µÄ×Ó×Ö·û´®¡£
find ±ØÑ¡¡£±»ËÑË÷µÄ×Ó×Ö·û´®¡£
......
ÕâÒ»¶Î´ó¼Ò±àд³ÌÐòºÜ¶àʱºò¶¼ÔÚʹÓÃAPI,Ëü¸øÎÒÃÇ´øÀ´ÁËÇ¿´óµÄ¹¦ÄÜ.ÈÃÎÒÃǷdz£¾ªÏ².
µ«ÊÇÎÒÃÇÔÚµ÷ÊÔ³ÌÐòµÄʱºòÓÐʱºò×ܻᱼÀ£.ÕâÑùºÜ²»·½±ã.
ÆäÖÐÓÐЩÊÇapiÈǵĻö
ʹÓÃapi×¢ÒâÊÂÏî:
Ê×ÏÈÎÒ˵˵ÎҵĹ۵ã.
1:ApiÊǺܶàϵͳҲÔÚÓÃ.ÎÒÃÇÔÚÉèÖòÎÊýʱÈç¹ûºÍϵͳµÄ²ÎÊýÓгåÍ».¾Í¿ÉÄÜÒýÆðÈí¼þ³ö´í
2.apiºÜ¶à¶¼ÊÇcÓïÑÔ±àдµÄ, ......