Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have this function in a dll ASM. My problem is how to call this function in vb or vb.net. I call others functions before, but this, the name contain "::", vb give me error name.

--------------------------------------------------------------------------------CFKViaDev::FV_ReadDataFromFK(long,long,void_*,unsigned_long,unsigned_long,unsigned_short_*,unsigned_long_*,unsigned_long,struct_HWND___*):
10002020 55 push ebp ; ?FV_ReadDataFromFK@CFKViaDev@@QAEJJJPAXKKPAGPAKKPAUHWND__@@@Z
10002021 8BEC mov ebp,esp
10002023 6AFF push 0FFFFFFFFh
10002025 68B8E50110 push offset off_1001E5B8
1000202A 689C8B0010 push offset off_10008B9C
1000202F 64A100000000 mov eax,fs:[0]
10002035 50 push eax
10002036 64892500000000 mov fs:[0],esp
1000203D 83EC18 sub esp,18h
10002040 53 push ebx
10002041 56 push esi
10002042 57 push edi
10002043 8BF1 mov esi,ecx
10002045 8975D8 mov [ebp-28h],esi
10002048 33DB xor ebx,ebx
1000204A 895DDC mov [ebp-24h],ebx
1000204D 895DE0 mov [ebp-20h],ebx
10002050 BF01000000 mov edi,1
10002055 897DE4 mov [ebp-1Ch],edi
10002058 8B8638020000 mov eax,[esi+238h]
1000205E 6AFF push 0FFFFFFFFh
10002060 50 push eax
10002061 FF158CE20110 call dword ptr [WaitForSingleObject]
10002067 85C0 test eax,eax
10002069 0F85FB000000 jne loc_1000216A
1000206F 895DFC mov [ebp-4],ebx
10002072 8B4520 mov eax,[ebp+20h]
10002075 3BC3 cmp eax,ebx
10002077 7405 jz loc_1000207E
10002079 8B00 mov eax,[eax]
1000207B 8945E0 mov [ebp-20h],eax
1000207E loc_1000207E: ; Xref 10002077
1000207E 8B5524 mov edx,[ebp+24h]
10002081 3BD3 cmp edx,ebx
10002083 7508 jnz loc_1000208D
10002085 BA28230000 mov edx,2328h
1000208A 895524 mov [ebp+24h],edx
1000208D loc_1000208D: ; Xref 10002083
1000208D 8B860C020000 mov eax,[esi+20Ch]
10002093 48 dec eax
10002094 83F803 cmp eax,3
10002097 0F878E000000 jnbe loc_1000212B
1000209D FF248594210010 jmp dword ptr [off_10002194+eax*4]

100020A4 off_100020A4: ; Xref 10002194 100021A0
100020A4 8B0E mov ecx,[esi]
100020A6 3BCB cmp ecx,ebx
100020A8 7507 jnz loc_100020B1
100020AA BFF7FFFFFF mov edi,0FFFFFFF7h
100020AF EB7F jmp loc_10002130

100020B1 loc_100020B1: ; Xref 100020A8
100020B1 8B4528 mov eax,[ebp+28h]
100020B4 50 push eax
100020B5 6800040000 push 400h
100020BA 52 push edx
100020BB 8D55E0 lea edx,[ebp-20h]
100020BE 52 push edx
100020BF 8D45DC lea eax,[ebp-24h]
100020C2 50 push eax
100020C3 8B5518 mov edx,[ebp+18h]
100020C6 52 push edx
100020C7 8B450C mov eax,[ebp+0Ch]
100020CA 50 push eax
100020CB 8B5508 mov edx,[ebp+8]
100020CE 52 push edx
100020CF 8B4514 mov eax,[ebp+14h]
100020D2 50 push eax
100020D3 8B5510 mov edx,[ebp+10h]
100020D6 52 push edx
100020D7 E884420000 call fn_10006360
100020DC 85C0 test eax,eax
100020DE 7553 jnz loc_10002133
100020E0 BFFCFFFFFF mov edi,0FFFFFFFCh
100020E5 EB49 jmp loc_10002130

100020E7 off_100020E7: ; Xref 10002198 1000219C
100020E7 8B4E04 mov ecx,[esi+4]
100020EA 3BCB cmp ecx,ebx
100020EC 7507 jnz loc_100020F5
100020EE BFF7FFFFFF mov edi,0FFFFFFF7h
100020F3 EB3B jmp loc_10002130

100020F5 loc_100020F5: ; Xref 100020EC
100020F5 8B4528 mov eax,[ebp+28h]
100020F8 50 push eax
100020F9 6800040000 push 400h
100020FE 52 push edx
100020FF 8D55E0 lea edx,[ebp-20h]
10002102 52 push edx
10002103 8D45DC lea eax,[ebp-24h]
10002106 50 push eax
10002107 8B5518 mov edx,[ebp+18h]
1000210A 52 push edx
1000210B 8B450C mov eax,[ebp+0Ch]
1000210E 50 push eax
1000210F 8B5508 mov edx,[ebp+8]
10002112 52 push edx
10002113 8B4514 mov eax,[ebp+14h]
10002116 50 push eax
10002117 8B5510 mov edx,[ebp+10h]
1000211A 52 push edx
1000211B E870240000 call fn_10004590
10002120 85C0 test eax,eax
10002122 750F jnz loc_10002133
10002124 BFFCFFFFFF mov edi,0FFFFFFFCh
10002129 EB05 jmp loc_10002130

1000212B loc_1000212B: ; Xref 10002097
1000212B BFFEFFFFFF mov edi,0FFFFFFFEh
10002130 loc_10002130: ; Xref 100020AF 100020E5 100020F3 10002129
10002130 897DE4 mov [ebp-1Ch],edi
10002133 loc_10002133: ; Xref 100020DE 10002122
10002133 83FF01 cmp edi,1
10002136 7526 jnz loc_1000215E
10002138 8B4DDC mov ecx,[ebp-24h]
1000213B 663BCB cmp cx,bx
1000213E 7508 jnz loc_10002148
10002140 BFFAFFFFFF mov edi,0FFFFFFFAh
10002145 897DE4 mov [ebp-1Ch],edi
10002148 loc_10002148: ; Xref 1000213E
10002148 8B451C mov eax,[ebp+1Ch]
1000214B 3BC3 cmp eax,ebx
1000214D 7403 jz loc_10002152
1000214F 668908 mov [eax],cx
10002152 loc_10002152: ; Xref 1000214D
10002152 8B4520 mov eax,[ebp+20h]
10002155 3BC3 cmp eax,ebx
10002157 7405 jz loc_1000215E
10002159 8B4DE0 mov ecx,[ebp-20h]
1000215C 8908 mov [eax],ecx
1000215E loc_1000215E: ; Xref 10002136 10002157
1000215E C745FCFFFFFFFF mov dword ptr [ebp-4],0FFFFFFFFh
10002165 E81B000000 call fn_10002185
1000216A loc_1000216A: ; Xref 10002069
1000216A 8BC7 mov eax,edi
1000216C 8B4DF0 mov ecx,[ebp-10h]
1000216F 64890D00000000 mov fs:[0],ecx
10002176 5F pop edi
10002177 5E pop esi
10002178 5B pop ebx
10002179 8BE5 mov esp,ebp
1000217B 5D pop ebp
1000217C C22400 ret 24h

1000217F off_1000217F: ; Xref 1001E5C0
1000217F 8B75D8 mov esi,[ebp-28h]
10002182 8B7DE4 mov edi,[ebp-1Ch]

10002185 fn_10002185: ; Xref 10002165
10002185 8BB638020000 mov esi,[esi+238h]
1000218B 56 push esi
1000218C FF159CE20110 call dword ptr [ReleaseMutex]
10002192 C3 ret

10002193 90 nop
10002194 off_10002194: ; Xref 1000209D
10002194 A4200010 dd offset off_100020A4
10002198 E7200010 dd offset off_100020E7
1000219C E7200010 dd offset off_100020E7
100021A0 A4200010 dd offset off_100020A4

100021A4 CCCCCCCCCCCCCCCCCCCC.. db 12 dup (0CCh)

----------------------------------------------------------------------------------

Thanks for replay
Posted

1 solution

That's not an "assembly language function".

That's the disassembly listing of a method in a C++ class.

In order for this to work, the library has to be exposed via COM. Without that, you're kind of screwed. You'd have to write your own C++ COM wrapper library to get at these methods.

First this to do is find out more about the library and if it registers itself as a COM library.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900