Oops! The lab …

» Currently browsing: Technology


FW:How to use Word

August 13th, 2007 at 10:08 pm » Comments (130)

vc++操作word
转载请注明出处:(鼓手)http://www.cnitblog.com/lifw/articles/vcpp_officeword.html最近根据项目需要,需要我去用 vc++6.0 作一个 ActiveX web 组件。自己从来没有接触过这方面的编程,这次是头一遭!所以咱就做了,不过倒很出乎我的意料,比我想象的要快很多就完成了。现将 vc++6.0 操作 word 部分的关键代码部分帖出来,共享给大家。

因为我在开发的时候遇到了很多问题,并且网上的资料很少,基本都是最基本的操作。所以帖出来,希望能让大家在开发的过程少走些弯路!



How to get Document Properties

August 13th, 2007 at 9:23 pm » Comments (1308)

Refer to these two link
http://support.microsoft.com/kb/179494/EN-US/
http://support.microsoft.com/kb/238393



How to clean IE history

July 18th, 2007 at 5:56 pm » Comments (357)

1. History
 HRESULT   ClearHistory()   
{
    IUrlHistoryStg2   *   pUrlHistoryStg2=NULL;  
    CoInitialize(NULL);   
    HRESULT   hr=CoCreateInstance(CLSID_CUrlHistory,
                NULL,
                CLSCTX_INPROC,
                IID_IUrlHistoryStg2,
                (void*)&&pUrlHistoryStg2);   
    if(SUCCEEDED(hr))   
    {
        hr=pUrlHistoryStg2->ClearHistory();   
        pUrlHistoryStg2->Release();   
    }
    CoUninitialize();   
    return   hr;  
}  
2. Cache



Some common directory we can find in the registry

July 18th, 2007 at 5:09 pm » Comments (228)

1. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
AppData
Cache
CD Burning
Cookies
Desktop
Favorites
Fonts
History
Local AppData
Local Settings
My Music
My Pictures
My Video
NetHood
Programs
Recent
SendTo
Start Menu
Startup
templates
2. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
AppData
Cache
CD Burning
Cookies
Desktop
Favorites
Fonts
History
Local AppData
Local Settings
My Music
My Pictures
My Video
NetHood
Programs
Recent
SendTo
Start Menu
Startup
templates



FW: SECURITY_LOGON_TYPE enumeration [Security]

May 23rd, 2007 at 1:11 pm » Comments (739)

SECURITY_LOGON_TYPE enumeration [Security]

The SECURITY_LOGON_TYPE enumeration indicates the type of logon requested by a logon process.
 
typedef enum _SECURITY_LOGON_TYPE
{
Interactive = 2,
Network,
Batch,
Service,
Proxy,
Unlock,
NetworkCleartext,
NewCredentials,
RemoteInteractive,
CachedInteractive,
CachedRemoteInteractive,
CachedUnlock
}SECURITY_LOGON_TYPE, […]



FW: Security Events Logon Type Definitions

May 22nd, 2007 at 5:51 pm » Comments (66)

Taken from ntsecapi.h in the security subdirectory on the Win32 SDK CD. Used by a logon process to indicate what type of logon is being requested.
typedef enum _SECURITY_LOGON_TYPE
{
Interactive = 2, // Interactively logged on (locally or remotely)
Network = 3, […]



WindowsNT Admin Tips: EentLogs

May 22nd, 2007 at 5:46 pm » Comments (59)

http://www.windowsnetworking.com/kbase/WindowsTips/WindowsNT/AdminTips/EventLogs/



FW:Security Event Descriptions

May 22nd, 2007 at 4:53 pm » Comments (51)

http://support.microsoft.com/kb/q174074/
   Event ID: 512
       Type: Success Audit
Description: Windows NT is starting up.
   Event ID: 513
       Type: Success Audit
Description: Windows NT is shutting down. All logon sessions will be
             terminated by this shutdown.
   Event ID: 514
       Type: Success Audit
Description: An authentication package has been loaded by the Local
             Security Authority. This authentication package will be
             used […]



FW: Kernel-mode backdoors for Windows NT

April 19th, 2007 at 11:04 am » Comments (298)

==Phrack Inc.==
Volume 0×0b, Issue 0×3e, Phile #0×06 of 0×10
|=—————=[ Kernel-mode backdoors for Windows NT ]=————–=|
|=———————————————————————–=|
|=—————–=[ firew0rker <firew0rker@nteam.ru> ]=—————-=|
|=—————-=[ the nobodies <http://www.nteam.ru> ]=—————=|
–[ Table of contents
1 - PREFACE



ERROR LNK1179 : Duplicate “_IID_XXXXX”

April 16th, 2007 at 8:28 pm » Comments (3418)

When you develop an add-in for excel 2003, you will get this link error message if you just import the type-lib.
The error produces because some IID are redefined in mso.olb
How to solve it? There are two ways:
1. Rename the name.
For example, rename(”DiagramNode”,”MSODiagramNode”)
2. If you won’t use that object, you can simply exclude them.
 Following is the correct […]