各种帮助 [英] VARIANT help
问题描述
我对自己拥有的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屋!