| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1939 人关注过本帖
标题:C调用VC++6.0封装的DLL
只看楼主 加入收藏
Apollo_c
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2017-3-3
收藏
得分:0 
以下是引用wp231957在2017-3-4 09:19:36的发言:

wp231957@    另: 还是无法下载

 邮件已发,请查收,帮忙把把脉,谢谢!
2017-03-04 10:23
wp231957
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:神界
等 级:贵宾
威 望:423
帖 子:13688
专家分:53332
注 册:2012-10-18
收藏
得分:0 
你提供的DLL中并没有那两个P???97的函数啊
你提供的DLL中所有导出函数名称如下
H2TL
HS
HS2P
HS2T
HS2V
HS2X
HV
HV2P
HV2S
HV2T
HV2X
HX
HX2P
HX2PHP
HX2PLP
HX2S
HX2SHP
HX2SLP
HX2T
HX2THP
HX2TLP
HX2V
HX2VHP
HX2VLP
HXHP
HXLP
P2CPG
P2CPL
P2CVG
P2CVL
P2EG
P2EL
P2EPSG
P2EPSL
P2ETAG
P2ETAL
P2G
P2HG
P2HL
P2KSG
P2KSL
P2L
P2NG
P2NL
P2PRNG
P2PRNL
P2RAMDG
P2RAMDL
P2SG
P2SL
P2SSPG
P2SSPL
P2T
P2UG
P2UL
P2VG
P2VL
PH
PH2S
PH2SSP
PH2T
PH2V
PH2X
PS
PS2H
PS2T
PS2V
PS2X
PT
PT2CP
PT2CPMV
PT2CV
PT2CVMV
PT2E
PT2EMV
PT2EPS
PT2ETA
PT2H
PT2HMV
PT2KS
PT2MV
PT2N
PT2PRN
PT2RAMD
PT2S
PT2SMV
PT2SSP
PT2SSPMV
PT2U
PT2V
PT2VMV
PT2X
PV
PV2H
PV2S
PV2T
PV2X
PX
PX2H
PX2S
PX2T
PX2V
S2TG
SETSTD_WASP
SV
SV2H
SV2P
SV2T
SV2X
SX
SX2H
SX2HHP
SX2HLP
SX2HMP
SX2P
SX2PHP
SX2PLP
SX2PMP
SX2T
SX2THP
SX2TLP
SX2TMP
SX2V
SX2VHP
SX2VLP
SX2VMP
SXHP
SXLP
SXMP
T2CPG
T2CPL
T2CVG
T2CVL
T2EG
T2EL
T2EPSG
T2EPSL
T2ETAG
T2ETAL
T2G
T2HG
T2HL
T2KSG
T2KSL
T2L
T2NG
T2NL
T2P
T2PRNG
T2PRNL
T2RAMDG
T2RAMDL
T2SG
T2SL
T2SSPG
T2SSPL
T2SURFT
T2UG
T2UL
T2VG
T2VL
TH
TH2P
TH2PHP
TH2PLP
TH2S
TH2SHP
TH2SLP
TH2V
TH2VHP
TH2VLP
TH2X
TH2XHP
TH2XLP
THHP
THLP
TS
TS2H
TS2HHP
TS2HLP
TS2P
TS2PHP
TS2PLP
TS2V
TS2VHP
TS2VLP
TS2X
TSHP
TSLP
TV
TV2H
TV2P
TV2S
TV2X
TX
TX2H
TX2P
TX2S
TX2V
V2TG
VX
VX2H
VX2HHP
VX2HLP
VX2P
VX2PHP
VX2PLP
VX2S
VX2SHP
VX2SLP
VX2T
VX2THP
VX2TLP
VXHP
VXLP

DO IT YOURSELF !
2017-03-04 10:50
吹水佬
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:451
帖 子:10607
专家分:43186
注 册:2014-5-20
收藏
得分:3 
回复 7楼 Apollo_c
BAC.dll无P2T97和P2HL97函数
P2xxx部分函数只有:
文件名: C:\TEMP\BAC.dll
原始文件名:UEwasp.dll
------------------------------------------------
序号       虚拟地址  函数名
------------------------------------------------
0000001C  000012B0  P2CPG
0000001D  00001260  P2CPL
0000001E  00001350  P2CVG
0000001F  00001300  P2CVL
00000020  000013F0  P2EG
00000021  000013A0  P2EL
00000022  00001850  P2EPSG
00000023  00001800  P2EPSL
00000024  000015D0  P2ETAG
00000025  00001580  P2ETAL
00000026  00001990  P2G
00000027  000010D0  P2HG
00000028  00001080  P2HL
00000029  00001530  P2KSG
0000002A  000014E0  P2KSL
0000002B  00001920  P2L
0000002C  000018E0  P2NG
0000002D  000018A0  P2NL
0000002E  000017B0  P2PRNG
0000002F  00001760  P2PRNL
00000030  00001710  P2RAMDG
00000031  000016C0  P2RAMDL
00000032  00001170  P2SG
00000033  00001120  P2SL
00000034  00001490  P2SSPG
00000035  00001440  P2SSPL
00000036  00001030  P2T
00000037  00001670  P2UG
00000038  00001620  P2UL
00000039  00001210  P2VG
0000003A  000011C0  P2VL

就用P2HL当作P2HL97函数说说:
#include <stdio.h>
#include <windows.h>

typedef void WINAPI (*P2HL)(double, double*, int*);

main()
{
    HMODULE hLib;
    hLib = LoadLibrary("BAC.dll");
    if (hLib != 0)
    {
        P2HL p2hl = (P2HL)GetProcAddress(hLib, "P2HL");
        if (p2hl != 0)
        {
            double P=0, H=0;    //假设=0
            int Range=0;
            p2hl(P, &H, &Range);
            printf("%lf %d\n", H, Range);
        }
        FreeLibrary(hLib);
    }
}

2017-03-04 11:46
Apollo_c
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2017-3-3
收藏
得分:0 
以下是引用吹水佬在2017-3-4 11:46:31的发言:

BAC.dll无P2T97和P2HL97函数
P2xxx部分函数只有:
文件名: C:\TEMP\BAC.dll
原始文件名:UEwasp.dll
------------------------------------------------
序号       虚拟地址  函数名
------------------------------------------------
0000001C  000012B0  P2CPG
0000001D  00001260  P2CPL
0000001E  00001350  P2CVG
0000001F  00001300  P2CVL
00000020  000013F0  P2EG
00000021  000013A0  P2EL
00000022  00001850  P2EPSG
00000023  00001800  P2EPSL
00000024  000015D0  P2ETAG
00000025  00001580  P2ETAL
00000026  00001990  P2G
00000027  000010D0  P2HG
00000028  00001080  P2HL
00000029  00001530  P2KSG
0000002A  000014E0  P2KSL
0000002B  00001920  P2L
0000002C  000018E0  P2NG
0000002D  000018A0  P2NL
0000002E  000017B0  P2PRNG
0000002F  00001760  P2PRNL
00000030  00001710  P2RAMDG
00000031  000016C0  P2RAMDL
00000032  00001170  P2SG
00000033  00001120  P2SL
00000034  00001490  P2SSPG
00000035  00001440  P2SSPL
00000036  00001030  P2T
00000037  00001670  P2UG
00000038  00001620  P2UL
00000039  00001210  P2VG
0000003A  000011C0  P2VL

就用P2HL当作P2HL97函数说说:
#include <stdio.h>
#include <windows.h>

typedef void WINAPI (*P2HL)(double, double*, int*);

main()
{
    HMODULE hLib;
    hLib = LoadLibrary("BAC.dll");
    if (hLib != 0)
    {
        P2HL p2hl = (P2HL)GetProcAddress(hLib, "P2HL");
        if (p2hl != 0)
        {
            double P=0, H=0;    //假设=0
            int Range=0;
            p2hl(P, &H, &Range);
            printf("%lf %d\n", H, Range);
        }
        FreeLibrary(hLib);
    }
}

谢谢!
是的,我发的那个是经过别人修改的。UEwasp.dll是原版,第三方提供的开源软件。
2017-03-04 11:57
Apollo_c
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2017-3-3
收藏
得分:0 
以下是引用吹水佬在2017-3-4 11:46:31的发言:

BAC.dll无P2T97和P2HL97函数
P2xxx部分函数只有:
文件名: C:\TEMP\BAC.dll
原始文件名:UEwasp.dll
------------------------------------------------
序号       虚拟地址  函数名
------------------------------------------------
0000001C  000012B0  P2CPG
0000001D  00001260  P2CPL
0000001E  00001350  P2CVG
0000001F  00001300  P2CVL
00000020  000013F0  P2EG
00000021  000013A0  P2EL
00000022  00001850  P2EPSG
00000023  00001800  P2EPSL
00000024  000015D0  P2ETAG
00000025  00001580  P2ETAL
00000026  00001990  P2G
00000027  000010D0  P2HG
00000028  00001080  P2HL
00000029  00001530  P2KSG
0000002A  000014E0  P2KSL
0000002B  00001920  P2L
0000002C  000018E0  P2NG
0000002D  000018A0  P2NL
0000002E  000017B0  P2PRNG
0000002F  00001760  P2PRNL
00000030  00001710  P2RAMDG
00000031  000016C0  P2RAMDL
00000032  00001170  P2SG
00000033  00001120  P2SL
00000034  00001490  P2SSPG
00000035  00001440  P2SSPL
00000036  00001030  P2T
00000037  00001670  P2UG
00000038  00001620  P2UL
00000039  00001210  P2VG
0000003A  000011C0  P2VL

就用P2HL当作P2HL97函数说说:
#include <stdio.h>
#include <windows.h>

typedef void WINAPI (*P2HL)(double, double*, int*);

main()
{
    HMODULE hLib;
    hLib = LoadLibrary("BAC.dll");
    if (hLib != 0)
    {
        P2HL p2hl = (P2HL)GetProcAddress(hLib, "P2HL");
        if (p2hl != 0)
        {
            double P=0, H=0;    //假设=0
            int Range=0;
            p2hl(P, &H, &Range);
            printf("%lf %d\n", H, Range);
        }
        FreeLibrary(hLib);
    }
}

P是我要给定的已知值,H是计算结果,要返回给我的,
Range是一个调用成功与否得标志!
Range=0 表示输入的参数超限,不可能有对应的值!
Range=其它值,表示输入参数对应的状态点所处的区域。
2017-03-04 12:45
Apollo_c
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2017-3-3
收藏
得分:0 
以下是引用吹水佬在2017-3-4 11:46:31的发言:

BAC.dll无P2T97和P2HL97函数
P2xxx部分函数只有:
文件名: C:\TEMP\BAC.dll
原始文件名:UEwasp.dll
------------------------------------------------
序号       虚拟地址  函数名
------------------------------------------------
0000001C  000012B0  P2CPG
0000001D  00001260  P2CPL
0000001E  00001350  P2CVG
0000001F  00001300  P2CVL
00000020  000013F0  P2EG
00000021  000013A0  P2EL
00000022  00001850  P2EPSG
00000023  00001800  P2EPSL
00000024  000015D0  P2ETAG
00000025  00001580  P2ETAL
00000026  00001990  P2G
00000027  000010D0  P2HG
00000028  00001080  P2HL
00000029  00001530  P2KSG
0000002A  000014E0  P2KSL
0000002B  00001920  P2L
0000002C  000018E0  P2NG
0000002D  000018A0  P2NL
0000002E  000017B0  P2PRNG
0000002F  00001760  P2PRNL
00000030  00001710  P2RAMDG
00000031  000016C0  P2RAMDL
00000032  00001170  P2SG
00000033  00001120  P2SL
00000034  00001490  P2SSPG
00000035  00001440  P2SSPL
00000036  00001030  P2T
00000037  00001670  P2UG
00000038  00001620  P2UL
00000039  00001210  P2VG
0000003A  000011C0  P2VL

就用P2HL当作P2HL97函数说说:
#include <stdio.h>
#include <windows.h>

typedef void WINAPI (*P2HL)(double, double*, int*);

main()
{
    HMODULE hLib;
    hLib = LoadLibrary("BAC.dll");
    if (hLib != 0)
    {
        P2HL p2hl = (P2HL)GetProcAddress(hLib, "P2HL");
        if (p2hl != 0)
        {
            double P=0, H=0;    //假设=0
            int Range=0;
            p2hl(P, &H, &Range);
            printf("%lf %d\n", H, Range);
        }
        FreeLibrary(hLib);
    }
}

hLib是不是应该是hDLL?
2017-03-04 22:30
Apollo_c
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2017-3-3
收藏
得分:0 
以下是引用吹水佬在2017-3-4 11:46:31的发言:

BAC.dll无P2T97和P2HL97函数
P2xxx部分函数只有:
文件名: C:\TEMP\BAC.dll
原始文件名:UEwasp.dll
------------------------------------------------
序号       虚拟地址  函数名
------------------------------------------------
0000001C  000012B0  P2CPG
0000001D  00001260  P2CPL
0000001E  00001350  P2CVG
0000001F  00001300  P2CVL
00000020  000013F0  P2EG
00000021  000013A0  P2EL
00000022  00001850  P2EPSG
00000023  00001800  P2EPSL
00000024  000015D0  P2ETAG
00000025  00001580  P2ETAL
00000026  00001990  P2G
00000027  000010D0  P2HG
00000028  00001080  P2HL
00000029  00001530  P2KSG
0000002A  000014E0  P2KSL
0000002B  00001920  P2L
0000002C  000018E0  P2NG
0000002D  000018A0  P2NL
0000002E  000017B0  P2PRNG
0000002F  00001760  P2PRNL
00000030  00001710  P2RAMDG
00000031  000016C0  P2RAMDL
00000032  00001170  P2SG
00000033  00001120  P2SL
00000034  00001490  P2SSPG
00000035  00001440  P2SSPL
00000036  00001030  P2T
00000037  00001670  P2UG
00000038  00001620  P2UL
00000039  00001210  P2VG
0000003A  000011C0  P2VL

就用P2HL当作P2HL97函数说说:
#include <stdio.h>
#include <windows.h>

typedef void WINAPI (*P2HL)(double, double*, int*);

main()
{
    HMODULE hLib;
    hLib = LoadLibrary("BAC.dll");
    if (hLib != 0)
    {
        P2HL p2hl = (P2HL)GetProcAddress(hLib, "P2HL");
        if (p2hl != 0)
        {
            double P=0, H=0;    //假设=0
            int Range=0;
            p2hl(P, &H, &Range);
            printf("%lf %d\n", H, Range);
        }
        FreeLibrary(hLib);
    }
}

hLib是不是应该是hDLL?
2017-03-04 23:21
吹水佬
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:451
帖 子:10607
专家分:43186
注 册:2014-5-20
收藏
得分:0 
hLib是自定义的:
HMODULE hLib;
跟风的话就是 hModule
2017-03-05 05:34
快速回复:C调用VC++6.0封装的DLL
数据加载中...
 
   



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

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