E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
DllImport
C# 命令行参数分割
CommandLineToArgvW函数[
DllImport
("shell32.dll",SetLastError=true)]privatestaticexternIntPtrCommandLineToArgvW
Z_W_H_
·
2023-09-07 05:05
C#
c#
开发语言
CAD二次开发高版本调用内部命令AcedCmdS和AcedCmdC
//调用AutoCAD命令,ARX原型:intacedCmdS(conststructresbuf*rbp);[
DllImport
("accore.dll",EntryPoint="acedCmdS",
三好学生~张旺
·
2023-09-07 00:06
.NET
C#
CAD二次开发
CAD二次开发
调用内部命令
Acedcmds
iOS中OBJC_EXPORT的使用
在Windows中,OBJC_VISIBLE是__declspec(dllexport)或__declspec(
dllimport
),否则是
hanqingYang
·
2023-09-03 22:38
unity跨屏显示
usingSystem.Runtime.InteropServices;publicclassScreenManager:MonoBehaviour{[HideInInspector]//导入设置窗口函数[
DllImport
龙胖胖的博客
·
2023-09-02 00:56
unity
游戏引擎
C#ini文件帮助类
usingSystem.Runtime.InteropServices;usingSystem.Text;namespaceIS.Tools{//////Ini扩展方法///publicclassIniHelper{[
DllImport
djk8888
·
2023-08-29 18:18
c#
ini
C# 调用C++动态库异常闪退解决
因为牵涉到安全性,所以只放关键部分代码//申明DLL加载方法[
DllImport
("*.dll",CallingConvention=CallingConvention.StdCall)]publicstaticexternintbusiness_handle
make1828
·
2023-08-28 04:32
C#
C#调用C++动态库闪退
动态链接库--dll使用示例
stdcall,使用extern“C”限定C编译环境,使用上述vs2010版本生成.代码如下://Dll1.h#ifdefDLL1_API#else#defineDLL1_API__declspec(
dllimport
SNAKEpc12138
·
2023-08-27 09:27
动态链接库
C++
microsoft
c++
windows
C#采用
DLLImport
无法加载第三方Dll文件
在引用第三方文件时,出现如下问题:引用方式:采用
DllImport
类加载非托管第三方API,调用托管方法。
Love朴啾啾
·
2023-08-25 23:16
C#基础
c#
C++-dllexport与
dllimport
介绍和使用
dllexport与
dllimport
dllexport与
dllimport
存储级属性是微软对C和C++的扩展,可用于从dll中导入或导出函数、数据、对象(objects)语法__declspec(
dllimport
mrbone11
·
2023-08-25 04:58
C++
c++
开发语言
dll
动态链接库
对 PInvoke 函数“XX”的调用导致堆栈不对称。原因可能是托管的 PInvoke 签名与非托管的目标签名不匹配。请检查 PInvoke 签名的调用约定和参数与非托管的目标签名是否匹配。
原代码[
DllImport
(m_FillNmame,EntryPoint="PMSifRegister",CharSet=CharSet.Auto,CallingConvention=CallingConvention.S
汪锦鹏
·
2023-08-24 05:00
查问题
C#
C#——快速使用Win32API的方法
[
DllImport
("user32.dll")]staticexternintGetWindowTextLength(IntPtrhWnd);功能介绍推荐一款类库Microsoft.Windows.CsWin32
一者仁心
·
2023-08-23 01:25
C#
c#
windows
开发语言
[C#/C/C++] GetShortPathName详解, 长路径转换为短路径
GetShortPathNameWfunction(fineapi.h)-Win32apps|Microsoftdocs(纯英文,没有中文版本.)引用命名空间:usingSystem.Runtime.InteropServices;关键代码:C#[
DllImport
SlimeNull
·
2023-08-19 21:22
C++
.NET
笔记
C#
.net
c++
win32
winapi
C# 应用程序强制获取焦点
Windorm和WPF等应用程序想自己获取焦点焦点那是不可能的,只能通过系统的API来实现[System.Runtime.InteropServices.
DllImport
("user32.dll",CharSet
baoolong
·
2023-08-19 08:00
C#
c#
焦点
获取
Windows
控件
C++ error:无法从“const char ”转换为“char *”
原因项目属性->C/C+±>语言->符合模式选项的含义/permissive-:启用所有严格标准符合性编译器选项,并禁用大部分特定于Microsoft的编译器扩展(但有一些例外,比如__declspec(
dllimport
三毛的二哥
·
2023-08-18 23:49
C++
c++
dll调用nodejs的回调函数
c语言中cdll.h文件extern"C"{typedefvoid(*JsCall)(intindex);//这个就是要传入的类型结构extern__declspec(
dllimport
)intAdd(
chduguxue
·
2023-08-17 19:09
javascript
前端
java
C++ 导入导出动态库
今天不明白为什么大家在写动态库的时候,都要用到#ifdef@@@@API#else#define@@@@__declspec(
dllimport
)#endif为什么明明是导出动态库,还要用到
dllimport
linersay
·
2023-08-16 12:01
C++
基础概念
Qt调用C++动态链接库--导出类
DLL动态链接库1.生成导出类#pragmaonce#ifndefDLL_IMPORT#defineAPI__declspec(dllexport)#else#defineAPI__declspec(
dllimport
Lovey_北禾
·
2023-08-16 12:30
C++
DLL
环境配置
c++
c++中的__stdcall、__declspec(dllexport)、__declspec(
dllimport
)
__stdcall函数调用约定被这个关键字修饰的函数,其参数都是从右向左通过堆栈传递的(__fastcall的前面部分由ecx,edx传),函数调用在返回前要由被调用者清理堆栈。__stdcall是函数调用约定的一种,函数调用约定主要约束了两件事:1.参数传递顺序2.调用堆栈由谁(调用函数或被调用函数)清理常见的函数调用约定:stdcallcdeclfastcallthiscallnakedcal
百口可乐__
·
2023-08-13 04:41
c++
c++
开发语言
C#与C/C++交互(1)——需要了解的基础知识
常见的代码用法如下:[
DllImport
("Test.dll",EntryPoint="Load",CallingConvention=CallingConvention.Cdecl,SetLastError
永恒星
·
2023-08-07 07:02
跨平台交互
C#
P/Invoke
stdcall与cdecl
StructLayout
MonoPInvoke
unsafe
fixed
winform中消息提示框延时自动关闭
https://www.cnblogs.com/dangpengfei/p/12766281.html[
DllImport
("user32.dll")]publicstaticexternintMessageBoxTimeoutA
简单的绿竹
·
2023-08-06 21:29
.net(C#)
Winform
c#
开发语言
后端
基于ffmpeg与SDL的视频播放库
头文件代码:#pragmaonce#ifdef__DLLEXPORT#define__DLL_EXP_declspec(dllexport)#else#define__DLL_EXP_declspec(
dllimport
光谷码农
·
2023-08-06 00:32
音视频编解码
ffmpeg
音视频
c#调用C++的dll报错“外部组件发生异常”
voidsetfile(char**filename)dll函数中有个参数接收char**,内容是文件名的集合,于是我就用了string[]然而传的路径是中文时就会报“外部组件发生异常”错误解决方法原先[
DllImport
迷惘小书童
·
2023-08-04 22:27
C#
c#
【转载】__declspec(
dllimport
) __declspec(dllexport)
https://blog.csdn.net/fsdad/article/details/115632555一、基本概念_declspec(dllexport)与_declspec(
dllimport
)都是
这个人不是画家
·
2023-08-03 11:22
c++
C#
DllImport
用法和路径问题
DllImport
是System.Runtime.InteropServices命名空间下的一个属性类,其功能是提供从非托管DLL导出的函数的必要调用信息。
Nemo_XP
·
2023-08-02 15:20
C#
无法加载 DLL“xxxx.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。
目录1、DLL引用的问题1、DLL引用的问题这两篇文章说的很好,C#
DllImport
用法和路径问题和无法加载DLL“xxxx.dll”:找不到指定的模块但我折腾了2天,还是没有解决。
zlbcdn
·
2023-08-02 15:17
找Bug
C#调用C++类库dll,无法找到函数入口(无法在“***.dll“中找到名为“***“的入口点)
问题:在使用C#的
DllImport
调用C++编写的类库dll时候,出现找不到函数入口点。
王小波门下走狗
·
2023-08-01 21:20
C
编程
c++
dll
c#
C# Winform 多进程窗体间传值->SendMessage()
首先,你需要添加对WindowsAPI的引用:[
DllImport
("user32.dll",CharSet=CharSet.Au
_oP_i
·
2023-08-01 04:10
winform
c#
winform
C# 判断文件是否被打开
[
DllImport
("kernel32.dll")]publicstaticexternIntPtr_lopen(stringlpPathName,intiReadWrite);[
DllImport
(
ou.cs
·
2023-07-30 14:47
C#
c#
开发语言
java
error LNK2019: 无法解析的外部符号 "__declspec(
dllimport
)
我在VS2005下写C++的程序,采用一个工程生成DLL文件给另一个工程执行,但每次执行时都出现errorLNK2019:无法解析的外部符号"__declspec(
dllimport
)错误。
在他乡奋斗
·
2023-07-30 08:52
vc++
文章
dll
exe
c
原因可能是托管的PInvoke签名与非托管的目标签名不匹配
有两种解决方式:1.改C#中的声明:如[
DllImport
("winmm.dll",EntryPoint="sndPlaySoundA",)]为[
DllImport
("winmm.dll",EntryPoint
在他乡奋斗
·
2023-07-30 08:52
C#
三种C++转C#的方法(带指针转换、Demo源码)
第一种是直接添加c++项目引用第二种是使用
DllImport
的方式前两种可以参考:https://blog.csdn.net/zxy13826134783/article/details/84190800
zxy2847225301
·
2023-07-28 23:17
C#编程
C++
C#
dll
C#调用C++
C# 调用C++封装的dll库函数的方法(一)
本章讲述:C#调用C++封装的dll库函数,以及使用注意事项,分两个章节说明;注意事项:用
DllImport
属性修饰的方法必须具有extern修饰符。
^@^lemon tea^@^
·
2023-07-28 23:12
C#
C#调用C++库的方法
c++库函数 有引用包含数组的结构体时,c# 调用方法
首先,需要使用
DllImport
属性来导入C++库中的函数。其次,在C#中定义的结构体需要与C++中定义的结构体匹配。这意味着它们的字段类型和顺序必须相同。
老白416396571
·
2023-07-28 23:41
c++
c#
C#仿热血江湖
目录1C#仿热血江湖1.1GClass1041.1.1
DllImport
1.2GClass1051.3method_0C#仿热血江湖GClass104usingSystem;usingSystem.Diagnostics
weixin_42132177
·
2023-07-28 07:54
C++仿游戏热血江湖
c#
java
算法
使用Windows API控制系统音量及静音
今日查找控制其它exe静音的方法,发现下文:原文
DllImport
("user32.dll",CharSet=CharSet.Auto,SetLastError=true)]staticexternIntPtrSendMessage
beiger
·
2023-07-27 06:03
笔记
多媒体
程序开发
c#
winapi
C# 线程间不能调用剪切板的解决方法
在做外部程序窗口截图时候,用C#g.CopyFromScreen(newPoint(x,y),newPoint(0,0),bmp.Size);方法或WinAPI[
DllImport
("user32.dll
rogerfang
·
2023-07-27 03:38
通过窗口句柄获取控件信息
这里就记录一下关于通过句柄取值的方式首选需要准备一些Windows的API类,如下publicclassWindowAPI{#regionUser32[
DllImport
("user32.dll")]publicstaticexternboolShowWi
Tiger_shl
·
2023-07-26 02:28
C#
windows
开发语言
error LNK2001: 无法解析的外部符号 "__declspec(
dllimport
) public: __thiscall DuiLib::WindowImplBase::WindowImp
p=2078问题描述:在做duilib开发的时候,编译一个示例工程,出现如下错误:1>DuiWebWnd.obj:errorLNK2001:无法解析的外部符号"__declspec(
dllimport
)
swanabin
·
2023-07-25 06:34
编译错误
error
LNK2001
DuiLib
C/C++导出函数和变量
__declspec(dllexport)和extern"C"__declspec(dllexport)的区别三、示例一、导入导出机制__declspec(dllexport)和__declspec(
dllimport
1037号森林里一段干木头
·
2023-07-25 01:12
C++
c++
QT调用第三方动态链接库时报错error: LNK2019: 无法解析的外部符号 “__declspec(
dllimport
) “,error: LNK1120: 1 个无法解析的外部命令
QT中错误提示如下:mainwindow.objerror:LNK2019:无法解析的外部符号“__declspec(
dllimport
)int__cdecladd(int,int)”(_imp?
舒泱
·
2023-07-25 00:21
#
Qt
dll
c++
qt
vs
C# 操作Ini文件
C#操作Ini文件publicclassIniHelper{[System.Runtime.InteropServices.
DllImport
("kernel32")]privatestaticexternlongWritePrivateProfileString
C# 学习者
·
2023-07-22 02:18
C#
c#
hook32dll
pragmaonce#ifdefDLLTEST_EXPORTS#defineDLLTEST_API__declspec(dllexport)#else#defineDLLTEST_API__declspec(
dllimport
yunteng521
·
2023-07-20 22:30
#
Windows
逆向工程
windows
hook
dll
注入
逆向
untiy 打开windows资源浏览器 选择一个本地文件
windows自己的资源浏览器直接调用这个脚本的OpenResManager方法即可,返回值为选中的文件的绝对路径publicclassLoadResourceByFileDlg:IUtility{[
DllImport
吴梓穆
·
2023-07-20 10:01
unity
windows
unity
c#如何读取ini文件一个键值下的所有值
API调用最近在学习c#,我用的是api申明的方法,先创建一个类,详情如下:#regionAPI声明///获取所有节点名称(Section)[
DllImport
("kernel32.dll",CharSet
九辰O
·
2023-07-17 13:37
c#
笔记:C#调用C++动态库
这种形式可以用一个类来封装从dll文件中提取出来的方法,然后继承或调用此类;usingSystem.Runtime.InteropServices;//需要引入的命名空间//前缀必须是staticextern[
DllImport
qq_43472573
·
2023-07-16 18:05
dll
C#
c++
c#
c++
dll
c#调用C++库
c#调用C++库声明导出的C++方法[
DllImport
("c++库名",CallingConvention=CallingConvention.StdCall)]privatestaticexternvoidmethod_exsample
墨池象牙白
·
2023-07-16 18:05
c#
c#
c++
开发语言
Unity发布PC 设置窗口 无边框(显示win任务栏),或全屏无边框
设置win窗口无边框,就需要对获得Win的窗口信息,所以需要调用Win32的API[
DllImport
(“user32.dll”)]Win32API//并不是很全,如果在此没找到想要的函数,可点击Win32API
王源骏
·
2023-07-15 10:31
Unity小问题
unity
c#
游戏引擎
Unity与iOS交互(3)——常见交互示例
【基础的交互】传递基本数据类型和sring类型publicclassSample:MonoBehaviour{[
DllImport
("__Intern
永恒星
·
2023-07-15 08:01
iOS
跨平台交互
unity与iOS交互
c语言进程启动器,【还是弃坑吧】【请解除精华】从零开始编写启动器【WPF万岁】【C#大法好】...
如果你在用易语言:加模块,加模块,加模块如果你用CPP:
DllImport
,
DllImport
,
DllImport
如果你用VBwinform:
DllImport
,
DllImport
,DllIm
weixin_39859052
·
2023-07-14 23:47
c语言进程启动器
【Visual Studio】报错 LNK2019,使用 C++ 语言,配合 Qt 开发串口通信界面
“__declspec(
dllimport
)public:__cdecl
Zhao-Jichao
·
2023-06-21 06:05
Visual
Studio
c++
qt
vs
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他