1,486
社区成员
发帖
与我相关
我的任务
分享
DLLTREEMANAGER_API int __stdcall fnDllGetSubFolerNames(TCHAR* szFolderPath ,TCHAR** szFolderName_a, int *pNum)
{
FolderName* pFolderName = NULL;
FolderNode* pFolderNode = NULL , *pTemp = NULL;
pFolderNode = FolderNameList_SearchFolder(&FolderTree_pst->folderNameList, szFolderPath);
int i = 0;
for ( i = 0 ; i < pFolderNode->childFolderNum ; i++)
{
pTemp = pFolderNode->pChildFolder_a[i];
pFolderName = pTemp->pFolderName;
strcpy(szFolderName_a[i], pFolderName->szFolderName);
strcpy(szFolderName_a, pFolderName->szFolderName);
}
*pNum = i ;
return *pNum;
}
Private Declare Function fnDllGetSubFolerNames Lib "dllTreeManager.dll" (ByVal szPath As String, ByVal subFolerName As String, ByRef num As Long) As Long
Dim szSubFolderName(10) As String
Dim FolderNum, flg As Long
Dim i As Long
flg = fnDllGetSubFolerNames("C:\", szSubFolderName, FolderNum) '调用动态连接库获取子文件加的名字
DLLTREEMANAGER_API int __stdcall fnDllGetSubFolerNames(TCHAR* szFolderPath ,TCHAR* szFolderName_a, int *pNum)
{
FolderName* pFolderName = NULL;
FolderNode* pFolderNode = NULL , *pTemp = NULL;
pFolderNode = FolderNameList_SearchFolder(&FolderTree_pst->folderNameList, szFolderPath);
int i = 0;
// for ( i = 0 ; i < pFolderNode->childFolderNum ; i++)
// {
pTemp = pFolderNode->pChildFolder_a[i];
pFolderName = pTemp->pFolderName;
// strcpy(szFolderName_a[i], pFolderName->szFolderName);
strcpy(szFolderName_a, pFolderName->szFolderName);
// }
*pNum = 1;
return *pNum;
}
Private Declare Function fnDllGetSubFolerNames Lib "dllTreeManager.dll" (ByVal szPath As String, ByVal subFolerName As String, ByRef num As Long) As Long
Dim szSubFolderName As String
Dim FolderNum, flg As Long
Dim i As Long
flg = fnDllGetSubFolerNames("C:\", szSubFolderName, FolderNum) '调用动态连接库获取子文件加的名字
Private Declare Function fnDllGetSubFolerNames Lib "dllTreeManager.dll" _
(ByVal szPath As String, ByVal subFolerName As Long, ByRef num As Long) As Long
Dim szSubFolderName(10) As String
Dim FolderNum as long, flg As Long '<-每个变量都要指明类型
Dim i As Long
for i=0 to 10 'Unicode -> Ansi
szSubFolderName(i) = strconv(space$(256), vbFromUnicode)
next
flg = fnDllGetSubFolerNames("C:\", VarPtr(szSubFolderName(0)), FolderNum)
for i=0 to 10 'Ansi -> Unicode
szSubFolderName(i) = strconv(szSubFolderName(i), vbUnicode)
next
Option Explicit
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" _
(ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" _
(ByVal hwnd As Long) As Long
Private Sub Form_Activate()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim MyStr As String
'Create a buffer
MyStr = String(GetWindowTextLength(Me.hwnd) + 1, Chr$(0))
'Get the window's text
GetWindowText Me.hwnd, MyStr, Len(MyStr)
MsgBox MyStr
End Sub