您的位置:程序门 -> vc/mfc -> 进程/线程/dll



有关于用vc++写dll,给vb调用的问题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


有关于用vc++写dll,给vb调用的问题
发表于:2007-10-15 09:41:25 楼主
请大家帮帮忙,现在我有个问题,是这样的:一个usbfm收音机,原来程序是用vc++,界面用mfc写的,现在我就要利用这个程序写成一个dll文件,给到一个用vb写的软件调用,从而用上这个usbfm收音机。
原来vc++程序的流程:在主面板初始化完了以后,也就是
bool   cusbradiodlg::oninitdialog()
{初始化主面板;
  settimer(find_device,find_device_time,null);//find_device_time:500;
}
void   cusbradiodlg::ontimer(uint   nidevent)  
{
//determine   which   event   was   triggered   and   act   on   it
switch   (nidevent)
{
case   timer_find_device :killtimer(timer_find_device);
                                                                  m_fmradiodevice.openfmradio(&m_radiodata);//open   the   device   and   retrieve   the   radio   data
                                                                  ……
                                                                            settimer(timer_audio_stream,   timer_audio_stream_time,   null);
                case   timer_audio_stream   :m_fmradiodevice.streamaudio();break;
                }
}
现在我写个dll,只能让openfmradio(&m_radiodata)起作用:找到设备,读取设备里面设定的值,openradioaudio();opensoundcard()。但是给vb调用的时候不能听见fm的声音。在   vc++里面我试过在case   timer_audio_stream后面kill这个timer,也不能发声音;或者将这个timer_audio_stream_time由25ms增大到100ms,声音就听起来断断续续了。
        以上就是对我情况描叙,现在我想给这个vb调用写成dll文件的时候也能听见声音,怎么做呢???



快速检索

最新资讯
热门点击