Click here to Skip to main content
15,891,833 members
Home / Discussions / Mobile
   

Mobile

 
Questionplay Wav file using thread in win CE Pin
perumandla8-May-11 19:33
perumandla8-May-11 19:33 
AnswerRe: play Wav file using thread in win CE Pin
Mehdi Gholam20-Aug-11 0:56
Mehdi Gholam20-Aug-11 0:56 
QuestionIssue with wav file in win CE Pin
perumandla7-May-11 2:46
perumandla7-May-11 2:46 
AnswerRe: Issue with wav file in win CE Pin
Mehdi Gholam20-Aug-11 0:55
Mehdi Gholam20-Aug-11 0:55 
QuestionWhat minimum version of Android Build Target supported by Eclipse Helios? Pin
Le@rner6-May-11 22:17
Le@rner6-May-11 22:17 
AnswerRe: What minimum version of Android Build Target supported by Eclipse Helios? Pin
Mike DiGiovanni9-Oct-12 1:58
Mike DiGiovanni9-Oct-12 1:58 
QuestionHow to capture KeyDown event in WP7 Pin
Member 27847795-May-11 2:18
Member 27847795-May-11 2:18 
Questionhow to detect usb mass storage device in Windows CE [modified] Pin
perumandla4-May-11 2:32
perumandla4-May-11 2:32 
hi,

here i am coping vb.net code to "detect usb mass storage device when connected" , the code is working in vb.net but not working in window CE application.Please tell me how to write code to detect usb device in Windows Ce Application.

1.
    Imports System.Runtime.InteropServices
 2.
    Public Class Form1
 3.
 4.
        Private Const WM_DEVICECHANGE As Integer = &H219
 5.
        Private Const DBT_DEVICEARRIVAL As Integer = &H8000
 6.
        Private Const DBT_DEVTYP_VOLUME As Integer = &H2
 7.
 8.
        'Device information structure
 9.
        Public Structure DEV_BROADCAST_HDR
10.
            Public dbch_size As Int32
11.
            Public dbch_devicetype As Int32
12.
            Public dbch_reserved As Int32
13.
        End Structure
14.
15.
        'Volume information Structure
16.
        Private Structure DEV_BROADCAST_VOLUME
17.
            Public dbcv_size As Int32
18.
            Public dbcv_devicetype As Int32
19.
            Public dbcv_reserved As Int32
20.
            Public dbcv_unitmask As Int32
21.
            Public dbcv_flags As Int16
22.
        End Structure
23.
24.
        '<<<< Function that gets the drive letter from the unit mask >>>>
25.
        Private Function GetDriveLetterFromMask(ByRef Unit As Int32)
26.
            Dim i As Integer
27.
            For i = 0 To 25
28.
                If Unit And i Then Exit For
29.
                Unit = Unit >> 1
30.
            Next
31.
            Return Chr(i + 1 + Asc("A"))
32.
        End Function
33.
34.
        'Override message processing to check for the DEVICECHANGE message
35.
        Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
36.
            If m.Msg = WM_DEVICECHANGE Then
37.
                If m.WParam = DBT_DEVICEARRIVAL Then
38.
                    Dim DeviceInfo As DEV_BROADCAST_HDR
39.
                    DeviceInfo = Marshal.PtrToStructure(m.LParam, GetType(DEV_BROADCAST_HDR))
40.
                    If DeviceInfo.dbch_devicetype = DBT_DEVTYP_VOLUME Then
41.
                        Dim Volume As DEV_BROADCAST_VOLUME
42.
                        Volume = Marshal.PtrToStructure(m.LParam, GetType(DEV_BROADCAST_VOLUME))
43.
                        Dim DriveLetter As String = (GetDriveLetterFromMask(Volume.dbcv_unitmask) & ":\")
44.
                        Dim FileList() As String = IO.Directory.GetFiles(DriveLetter, "test.txt")
45.
                        If FileList.Count > 0 Then
46.
                            MessageBox.Show("Found Config File")
47.
                            '<<<< The test file has been found >>>>
48.
                            Else
49.
                            MessageBox.Show("Could not find config file")
50.
                            '<<<< Test file has not been found >>>>
51.
                        End If
52.
                    End If
53.
                End If
54.
            End If
55.
            MyBase.WndProc(m)
56.
        End Sub
57.
58.

59.
    End Class





Regards,
Ramakrishna.

modified on Wednesday, May 4, 2011 9:26 AM

QuestionStandard pay pal with PDA application Pin
S.Aijaz3-May-11 1:17
S.Aijaz3-May-11 1:17 
QuestionBegginer in Mobile Programming (Need help on mobile development in .net) Pin
S.Aijaz1-May-11 20:38
S.Aijaz1-May-11 20:38 
AnswerRe: Begginer in Mobile Programming (Need help on mobile development in .net) Pin
Richard MacCutchan1-May-11 23:23
mveRichard MacCutchan1-May-11 23:23 
GeneralRe: Begginer in Mobile Programming (Need help on mobile development in .net) Pin
S.Aijaz1-May-11 23:39
S.Aijaz1-May-11 23:39 
GeneralRe: Begginer in Mobile Programming (Need help on mobile development in .net) Pin
Richard MacCutchan1-May-11 23:47
mveRichard MacCutchan1-May-11 23:47 
GeneralRe: Begginer in Mobile Programming (Need help on mobile development in .net) Pin
S.Aijaz2-May-11 0:30
S.Aijaz2-May-11 0:30 
Questionrereceive from Servlet to J2ME Using Sessoin Pin
williamroma30-Apr-11 13:48
williamroma30-Apr-11 13:48 
AnswerRe: rereceive from Servlet to J2ME Using Sessoin Pin
williamroma30-Apr-11 14:45
williamroma30-Apr-11 14:45 
QuestionSQL CE 2.0 cyrillic characters - urgent please Pin
Tyler4525-Apr-11 1:13
Tyler4525-Apr-11 1:13 
AnswerRe: SQL CE 2.0 cyrillic characters - urgent please Pin
Richard MacCutchan25-Apr-11 1:41
mveRichard MacCutchan25-Apr-11 1:41 
GeneralRe: SQL CE 2.0 cyrillic characters - urgent please Pin
Tyler4525-Apr-11 2:35
Tyler4525-Apr-11 2:35 
QuestionNeed help with my Java Android code Pin
mofuobi20-Apr-11 23:57
mofuobi20-Apr-11 23:57 
AnswerRe: Need help with my Java Android code [modified] Pin
Patrick Kalkman21-Apr-11 9:47
Patrick Kalkman21-Apr-11 9:47 
AnswerRe: Need help with my Java Android code Pin
All Time Programming21-Apr-11 21:13
All Time Programming21-Apr-11 21:13 
QuestionWin CE getch() and clrscr() Pin
baerten14-Apr-11 23:44
baerten14-Apr-11 23:44 
AnswerRe: Win CE getch() and clrscr() Pin
Paul Heil15-Apr-11 7:49
Paul Heil15-Apr-11 7:49 
QuestionCamera not working working on Motorola MC95 when accessing with C++ / ME 6.5 Pin
lichtbringer14-Apr-11 23:24
lichtbringer14-Apr-11 23:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.