🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.visualbasic
Article #883

Re: 引数について

#883
From: norish
Date: Sat, 27 Dec 1997 00:00
40 lines
1558 bytes
多くの場合、以下の形式的な変換が有効です。
あとは自分で試行錯誤しましょう。

C側 -> VB側
(int iValue) -> (ByVal iValue As Long) (*1)
(void* lpBuffer) -> (ByRef lpBuffer As Any)
(struct_A* lpStruct) -> (ByRef lpStruct As struct_A)

*1. 32ビット環境では Long 、16ビット環境では Integer

vb4dll.txt も有用な情報を提供しています。インストールしたディレクトリ
にあります。

futamura wrote:
> どうも、VBの引数の渡し方が理解できず困っています。
> 
> C言語で書きますと下のようなことをVBで実現したいのです。
> アドバイスお願いします。
> 
> typedef struct{
>     int a;
>     long b;
>     char s[8];
> }UST;
> 
> /* データ送信関数 */
> int send_data( int sock, void far *_buf, int len )
> {
----- 途中省略 -----
> }
> 
> func( void )
> {
----- 途中省略 -----
> }
> 
> できれば、そのときのsend関数の宣言方法も教えてください。
> 宜しくお願いします。
>
Technical Details
Message-ID: <34A3EF6F.AB2396A9@writeme.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <FUTAMURA.97Dec25130431@hilbert.elcom.nitech.ac.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 105c2e,1df87256d580d904,start
X-Google-Attributes: gid105c2e,public
From: norish <norish@writeme.com>
Subject: Re: 引数について
Date: 1997/12/27
Message-ID: <34A3EF6F.AB2396A9@writeme.com>
X-Deja-AN: 310335684
Content-Transfer-Encoding: 7bit
References: <FUTAMURA.97Dec25130431@hilbert.elcom.nitech.ac.jp>
Mime-Version: 1.0
Reply-To: norish@writeme.com
Content-Type: text/plain; charset=iso-2022-jp
Organization: InfoWeb News Service
Newsgroups: fj.lang.visualbasic