各种帮助 [英] VARIANT help

查看:98
本文介绍了各种帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对自己拥有的SDK中的方法有些困惑.方法如下:

I''m a little confused about a method in a SDK that I have. Here''s the method:

HRESULT IDgnDictCustom::SnapShotSave( 
Variant IndexedFileName = vtMissing, Variant WaveFileName = vtMissing );



我不习惯使用变体,但是老实说,令我困惑的是如何正确使用此功能.这是期望将变体作为输入,但是我不认为您会以这种方式使用变体.

(我假设文件名只是我想​​要保存文件的路径)



I''m not used to using variants, but what is confusing me, honestly, is the how to use this function correctly. This is expecting the variants as an input, but I didn''t think you would use variants this way.

(I''m assuming the filenames are just the path where I want the file saved)

推荐答案

我已经在标题中找到了它

I have found this in the header

virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SnapshotSave(
    /* [optional][in] */ VARIANT IndexedFileName,
    /* [optional][in] */ VARIANT WaveFileName) = 0;



(稍微清理一下)

SnapshotSave(/* in */VARIANT IndexedFileName,/* in */VARIANT WaveFileName)

现在,命名文件名在尝试时仍然会导致错误(只是将其命名为"c:\ test.ibx").在这种情况下,命名变量的正确方法是什么?



(cleaning it up a bit)

SnapshotSave(/*in*/ VARIANT IndexedFileName, /*in*/ VARIANT WaveFileName)

now, naming the file names still causes an error when I try it (just name it like "c:\test.ibx") What''s the proper way to name the variant in this case?


这篇关于各种帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆