| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1460 人关注过本帖
标题:有問題求教
取消只看楼主 加入收藏
shankhands
Rank: 1
等 级:新手上路
帖 子:24
专家分:0
注 册:2008-10-6
收藏
 问题点数:0 回复次数:1 
有問題求教
我用的是,想用如下代碼實現獲得本地计算机上的拨号网络的项目

    Public Class Form1
    Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" ( _
    ByVal bKey As Integer, ByVal lpSubKey As String, ByRef phkResult As Integer) As Integer
    Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Integer) As Integer
    Private Declare Function RegEnumKey Lib "advapi32.dll" Alias _
    "RegEnumKeyA" (ByVal hKey As Integer, ByVal dwIndex As Integer, ByVal _
    lpName As String, ByVal chName As Integer) As Integer
    Const HKEY_CURRENT_USER As Integer = &H80000001
    Const ERROR_NO_MORE_ITEMS As Short = 259
    Const ERROR_SUCCESS As Short = 0
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim hKey As Integer
        Dim i As Integer
        'Dim astr As VBFixedStringAttribute
        Dim astr As VB6.fixedLengthString = New VB6.fixedLengthstring(256)
        If RegOpenKey(HKEY_CURRENT_USER, "RemoteAccess\Profile", hKey) = ERROR_SUCCESS Then
            While RegEnumKey(hKey, i, astr.value, 256) = ERROR_SUCCESS
                ListBox1.Items.Add(astr.value)
            End While
            RegCloseKey(hKey)
        Else
            ListBox1.Items.Add("There is some wrong") '此語句是用來說明沒有執行
        End If

    End Sub
End Class
出現的錯誤是:    未定义类型“VB6.fixedLengthString”。
請問這是怎麼回事.
在此先謝謝了!
搜索更多相关主题的帖子: 计算机 网络 
2008-10-17 14:56
shankhands
Rank: 1
等 级:新手上路
帖 子:24
专家分:0
注 册:2008-10-6
收藏
得分:0 
謝謝fairy4幫助!
2008-10-17 17:56
快速回复:有問題求教
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.070454 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved