SAS中文论坛

标题: 如何制作*.DLL格式的文件? [打印本页]

作者: shiyiming    时间: 2004-10-9 14:45
标题: 如何制作*.DLL格式的文件?
本想将自己的一些想法写成模块,请问怎样用SAS制作DLL格式的文件?
作者: shiyiming    时间: 2004-10-16 22:47
标题: oh
are you sure sas can make dynamic link library?
作者: shiyiming    时间: 2004-10-18 23:27
标题: 请指点!
我是说SAS安装程序里都有很多的*.DLL格式的文件,
不知道它是怎样做的,
还望指点!
作者: shiyiming    时间: 2004-10-18 23:28
标题: 请指点!
我是说SAS安装程序里都有很多的*.DLL格式的文件,
不知道它是怎样做的, 是不是用C#做的,或C++之类的?
还望指点!
作者: shiyiming    时间: 2004-10-19 00:12
标题: 讨厌,非要写主题
据说是C语言写的。
不过如果SAS没有提供调用功能。
你也没法用。
作者: shiyiming    时间: 2004-10-19 13:08
标题: *.dll
do you have any lectures about this topic?
please send it to me. contact me inbox here.
thanks!
作者: shiyiming    时间: 2004-10-19 16:01
标题: sorry
i know how to use delphi to create DLL and how to recall those functions.but i don't know how to use it with sas.
so i can not answer you.
作者: shiyiming    时间: 2004-10-20 00:35
标题: ugly
If SAS's DLL files of STAT module or others can be called directly by you , what to feed SAS Company every day?

But there is an exception, some DLL files of SAS IT module can be called if you have SAS/IT license which costs $100,000 annually.

I once built a demo of SAS/IT with MS C#.Net Tech, which can get data from a remote IT Server or do other operations on the Server after submitting commands from a local winForm client.
作者: shiyiming    时间: 2004-10-20 09:11
标题: 怎么这两天我回贴都有问题
but i think the way you used to submit SAS command was not call DLL. that was COM(common object model).
you used C# to create a SAS COM object and operated it
作者: shiyiming    时间: 2004-10-20 09:23
标题: ..
No! See:

using SAS;
using SASWorkspaceManager;

.......


private SASWorkspaceManager.WorkspaceManager manager = new WorkspaceManagerClass();
                private SAS.IWorkspace workspace;
                private IServerDef serverDef;

serverDef = new ServerDefClass();
                        serverDef.Port = ****;
                        serverDef.Protocol = Protocols.ProtocolBridge;

                        workspace = manager.Workspaces.CreateWorkspaceByServer("",Visibility.VisibilityProcess,serverDef,"","",out xmlInfo);
                        workspace.LanguageService.Submit("libname mylib \'E:\\data\';");
作者: shiyiming    时间: 2004-10-20 09:38
标题: hoho
your code is the standard procedure of creating COM object and operating it.
"new" is the keyword in C# to create a object. workspacemanager is a COM object.
the regular way to call DLL looks like this-----
"function myfunc; external 'my.dll' name 'outfunc'"
even i do not know the exact syntax of C#,  i think they are different.
作者: shiyiming    时间: 2004-10-20 10:39
标题: ...
I asked my friends and know there is syntax difference between Delphi and MS products ,and also Sun java.  is there 'New' in delphi?

In C#,i know a direct function to call DLL files ,for example:
DllImport("kernel32.dll")
private static extern int GetVolumeInformation(
                                string  lpRootPathName,
                                string  lpVolumeNameBuffer,
                                int  nVolumeNameSize,
                                ref int  lpVolumeSerialNumber,
                                int  lpMaximumComponentLength,
                                int  lpFileSystemFlags,
                                string  lpFileSystemNameBuffer,
                                int  nFileSystemNameSize
                                );

but I never tried it on SAS.dll;

Busy today, later discuss with you !
作者: shiyiming    时间: 2004-10-20 13:56
标题: hoh
delphi uses PASCAL as its programming language.
we use--  workspacemanager=createobject('workspacemanagerclass');
create... is the common way to create a new object.
作者: shiyiming    时间: 2004-10-20 15:08
标题: willon老兄.你有资料吗?
本来人家是问怎么用sas作dll,现在变成了我们讨论怎么使用sas的DLL了.
对了,我把sas提供的COM object都安装到delphi上了但是有一个问题就是怎么用.这就很麻烦了.
我可以看到那些对象的函数和过程.但是没有调用的资料以及详细的对象的hierarchy的介绍.还是没法用.麻烦.对了,willon老兄.你有资料吗?
作者: shiyiming    时间: 2004-10-22 00:30
标题: ...
sas,我所知道的,不能做dll,否则写出的sas程序可以脱离sas系统运行了,这是sas公司无论如何都不允许的。

SAS/IT我也只能算一知半解,以前sas公司让我看IT的help,就在sas安装目录下的integration technology目录下(非常垃圾),我是一页页翻过来的。不过由于最近这边买了IT,所以以后可能接触的很多。
作者: shiyiming    时间: 2004-10-22 10:16
标题: 调用其他应用程序的dll
其实我知道SAS倒是可以调用其他应用程序的dll,当然这需要那个dll的接口公布出来。

我觉得我们倒是可以讨论一下这个主题,这样就可以把别人已经开发的东西,轻易的嵌入自己的SAS程序了,免得2次3次重复开发。
作者: shiyiming    时间: 2004-10-22 11:08
标题: 。。。
hate ‘HAUTO’!
这垃圾,用起来真要命!调调别的dll还凑活,不过不知道怎么回事,SAS一直没有做什么新的改进,一点都不给你期待。

就像proc dbload,明明可以输出label,功能还真的不错,可惜一直都不升级,导入的字段名限制为8个字符,输出的excel限制在16k行,还是excel5格式。

真搞不懂sas公司在吃什么饭?
作者: shiyiming    时间: 2009-4-17 00:55
标题: Re: 如何制作*.DLL格式的文件?
楼上三位都是响当当的大侠
现在9.2可以调用dll了
不过编译dll似乎还不行吧,C不是很好,要是SAS可以做就好了8)
作者: shiyiming    时间: 2009-4-18 18:31
标题: Re: 调用其他应用程序的dll
班门弄斧一回~~~等着砖头砸
我知道至少在9.0就可以使用其他程序的DLL了。
偶尔我也这样调用系统命令。
这些接口信息都应该写在sascbtbl文件中。使用module调用。
C的也可以直接使用proc proto调用。
使用前调用proc compile。

不知道前辈还有没有其他方法~~~
作者: shiyiming    时间: 2009-4-19 13:51
标题: Re: 如何制作*.DLL格式的文件?
SAS(R) 9.2 Changes and Enhancements for Base SAS(R)
Session 1: New and Enhanced Procedures and Statements

<!-- m --><a class="postlink" href="http://www.sas.com/apps/elearning/elearning_details.jsp?pubcode=RLSP92C1">http://www.sas.com/apps/elearning/elear ... e=RLSP92C1</a><!-- m -->
作者: shiyiming    时间: 2009-4-24 11:33
标题: Re: 调用其他应用程序的dll
SAS自定义函数就可以调用外部Dll,还很不错,用过程PROC PROTO调用一下,再用proc  FCMP包装一下。具体过程见我blog。

ms用SAS做Dll文件,目前还是搞不定的。




欢迎光临 SAS中文论坛 (https://mysas.net/forum/) Powered by Discuz! X3.2