惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
D
Docker
博客园 - 司徒正美
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
U
Unit 42
J
Java Code Geeks
A
About on SuperTechFans
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security Affairs
I
Intezer
Cisco Talos Blog
Cisco Talos Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
T
Threatpost
H
Hacker News: Front Page
G
Google Developers Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
Lohrmann on Cybersecurity
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
S
Secure Thoughts
GbyAI
GbyAI
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - homegis

关于开源GIS和商业GIS的讨论 B树索引学习 cordova 开发 ios app 简要流程 cordova 开发 android app 简要流程 3D开源推荐:3DWebExplorer 3D开源推荐:全球卫星地图 Esri-Satellite-Map 空间网络分析开源环境的安装方法 Computing Aggregate Queries in Raster Image Databases Using Pre-Aggregated Data Cheetah:A High Performance, Custom Data Warehouse on Top of MapReduce 【转】 Ubuntu内核编译 Fuzzy C-Means Clustering【转】 【转】什么是数据驱动编程 DISPLAY connection problem when using ENVI/IDL in X Terminal LINUX 上 ENVI 4.7 安装步骤,IDL 调用方式 图论——网络最大流和最小截 Gfarm 安装(已测试) [转]多表连接的三种方式详解 HASH JOIN MERGE JOIN NESTED LOOP [转] 如何下载Google Earth中的卫星影像 【转】Envi调用MODIS Reprojection Tool(MRT)对MODIS产品进行批处理拼接、重投影、裁切 - homegis
VS2005 调用 IDL7.1 方法
homegis · 2010-04-02 · via 博客园 - homegis

         早些时候写过《 IDL 与 外部语言的几种集成方式(一)——connector》,这几天在VS2005下重新折腾IDL7.1程序调用,发现有些问题。已经解决,总结如下:

         三种方法 :

         一. IDLDrawWidget 控件(可视化界面)

        1. 新建Windows应用程序,添加IDLDrawWidget控件到环境,拖拽至程序界面。

        2.  触发事件中添加代码:

代码

            int n;
            
this.axIDLDrawWidget1.IdlPath = @"D:\Program Files\ITT\IDL71\bin\bin.x86\idl.dll";
            n 
= axIDLDrawWidget1.InitIDL((int)this.Handle);
            
if (n == 0)
            {
                MessageBox.Show(
"IDL 控件初始化失败");
            }
            axIDLDrawWidget1.SetOutputWnd((
int)richTextBox1.Handle);
            
string d = "d";
            axIDLDrawWidget1.ExecuteStr(
"restore,'satstretch.sav'");
            axIDLDrawWidget1.ExecuteStr(
"d=satstretch()");
            
string str = axIDLDrawWidget1.GetNamedData(d).ToString(); 

         其中,str 接收程序返回值。

         注: IDL 自 6.3 后就不再更新该控件,需要手动加入IDL的bin目录下几个文件到VS程序执行目录:pe_core.dll、pe_fact.dll、NCSEcw.dll、hd423m.dll、hm423m.dll

        二、COM_IDL_connect  组件

        1、新建VS程序,添加COM_IDL_connect组件

        2、触发事件中添加代码:

代码

            COM_IDL_connectClass COM = new COM_IDL_connectClass();
            COM.CreateObject(
000);
            
string app=Application.StartupPath;
            COM.ExecuteString(
".COMPILE "+app+"\\satstretch.pro");
            COM.ExecuteString(
"d=satstretch()");
            
string str = COM.GetIDLVariable(d).ToString();

       三、通过IDLEXBR_ASSISTANT输出程序DLL调用

       1、IDL命令行输入 IDLEXBR_ASSISTANT,弹出:Export Bridge Assitant,  按照IDL帮助文档设置好函数和变量属性。

       2、 cmd命令注册组件:regsvr32  组件.dll

       3、 新建VS程序,添加组件.dll。

       4、触发事件添加代码:

代码

            string d = "d";
            satstretchClass SSH 
= new satstretchClass();
            SSH.CreateObject(
000);
            
string app = Application.StartupPath;
            SSH.ExecuteString(
".COMPILE " + app + "\\satstretch.pro");
            SSH.ExecuteString(
"d=satstretch()");
            
string str = SSH.GetIDLVariable(d).ToString();

        测试例子:https://files.cnblogs.com/HomeGIS/IDLDrawWidget.rar

 转帖到人人网