Electronic Engineer Discuss

View: 5986|Reply: 3
Print Prev. thread Next thread

关于C#二次开发6204BC的问题,调用GetData报内存受保护huo'sun'...

[Copy link]

0

Threads

4

Posts

4

Credits

新手上路

Rank: 1

Credits
4
1#
Post time 2020-7-11 00:27:02 | Show all posts
同问,没有官方的c#demo,太郁闷了,楼主实验成功了吗?

0

Threads

4

Posts

4

Credits

新手上路

Rank: 1

Credits
4
2#
Post time 2020-7-12 15:32:16 | Show all posts
楼上大侠,我这里 总是 报警 ,要么 1`无法加载 DLL“HTHardDll.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。
要么 2`试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)
切换项目属性的平台类别(X86,X64,ANY CPU)也不作用,请大侠指点一下,

0

Threads

4

Posts

4

Credits

新手上路

Rank: 1

Credits
4
3#
Post time 2020-7-25 10:11:40 | Show all posts
借宝地在提问一下,请大神们关注一下吧
同样是RELAY_CONTROL的结构
在c++的demo中是这样定义的
typedef struct _HT_RELAY_CONTROL
{
        BOOL bCHEnable[MAX_CH_NUM];//此处定义的为 bool
        WORD nCHVoltDIV[MAX_CH_NUM];
        WORD nCHCoupling[MAX_CH_NUM];
        BOOL bCHBWLimit[MAX_CH_NUM];
        WORD nTrigSource;
        BOOL bTrigFilt;
        WORD nALT;
}RELAYCONTROL,*PRELAYCONTROL;
而在VB的demo中
Type RelayControl '详见SDK_HTHardDll_CHS.pdf
    bCHEnable(3) As Long//此处又定义为long了
    nCHVoltDIV(3) As Integer
    nCHCoupling(3) As Long
    bCHBWLimit(3) As Integer
    nTrigSource As Integer
    bTrigFilt As Long
    nALT As Integer
End Type
现在我调用C#调用dll同样也是报警,如何处理呀
You have to log in before you can reply Login | Register

Points Rules

Dark room|Mobile|Archiver|Electronic Engineer Discuss

2024-5-3 07:28 GMT+8 , Processed in 0.152846 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

Quick Reply To Top Return to the list