如何用windows api設定某檔案會被某程式打開的檔案關聯性 |
尚未結案
|
ybmh
一般會員 發表:20 回覆:14 積分:6 註冊:2004-01-14 發送簡訊給我 |
如何用Windows API設定某檔案會被某程式打開的檔案關聯性
我知道用RegSetValue這個API在登錄檔下註冊就行了
以下這個API是用VB裡的API-Viewer找出來的:
Public Declare Function RegSetValue Lib "advapi32.dll" Alias "RegSetValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
有誰知道參數hKey,dwType怎麼得到ㄋ??
|
qoo1234
版主 發表:256 回覆:1167 積分:659 註冊:2003-02-24 發送簡訊給我 |
RegSetValue()
Writes a given value to the registry. Currently only a PChar-type can be written. To store boolean or integer values, they must be converted. function RegSetValue(Key: HKey; SubKey: PChar; ValType: Longint; Value: PChar; cb: Longint): Longint; Key:
The Handle of the parent key (can be HKEY_CLASSES_ROOT). SubKey:
The subkey for which the value should be stored. ValType:
must be REG_SZ for Win31. Value:
The value to be stored. cb:
Size in bytes for the Value parameter. Windows 3.1 ignores this paramater. Returns:
ERROR_SUCCESS if function was successful; otherwise an error is returned. 網海無涯,學無止境!
|
ybmh
一般會員 發表:20 回覆:14 積分:6 註冊:2004-01-14 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |