hi
can someone possibly convert this to vb.net ?
it is c# code that lets the pocket pc access the voice recorder...
many thanks...
source: wapboy
http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=62
using System;
using System.Data;
using System.Runtime. InteropServices ;
/// <summary>
/// Creates an instance of the shell voice recorder
/// </summary>
public class VoiceRecorder
{
//API Declares
[StructLayout(La youtKind.Sequen tial)]
protected unsafe struct CM_VOICE_RECORD ER
{
public int cb;
public uint dwStyle;
public int xPos, yPos;
public IntPtr hwndParent;
public int id;
public String lpszRecordFileN ame;
};
[DllImport("voic ectl.dll", CallingConventi on=CallingConve ntion.Cdecl)]
private static extern IntPtr VoiceRecorder_C reate(ref CM_VOICE_RECORD ER
voicerec);
//end api delcare
private CM_VOICE_RECORD ER voicerec;
private IntPtr handle;
public unsafe VoiceRecorder()
{
voicerec = new CM_VOICE_RECORD ER();
handle = new IntPtr();
voicerec.cb = (int)Marshal.Si zeOf(voicerec);
voicerec.lpszRe cordFileName = \\My Documents\\Voic eControl.wav;
voicerec.xPos = -1;
voicerec.yPos = -1;
}
//show the voice recorder
public void Show()
{
handle = VoiceRecorder_C reate(ref voicerec);
}
}