Tema: Re: Konvertuoti i is C# i VB
Autorius: Valdas
Data: 2010-12-23 10:49:05
ir dar prie to pacio, kai tik bandau paleisti  SimReadPhonebookEntry, 
programa iskart luzta, tipo send error, gal zinot kodel ?

Dim hSim As Integer = 0

Dim uiUsed As System.UInt32 = 0

Dim uiTotal As System.UInt32 = 0

Dim result As Integer = SimInitialize(0, 0, 0, hSim)

result = SimGetPhonebookStatus(hSim, 16, uiUsed, uiTotal)

Dim adr As new SimPhoneBookEntry

adr.dwParams = 15

adr.cbSize = 1000

result = SimReadPhonebookEntry(hSim, 16, 1, adr)

result = SimDeinitialize(hSim)

"saimhe" <oh.no@oh.my> wrote in message 
news:iev0qk$6q6$1@trimpas.omnitel.net...
>> [StructLayout(LayoutKind.Sequential)]
>> public struct SIMPHONEBOOKENTRY
>> {
>> public uint cbSize; //
>> public uint dwParams; //
>> [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
>> public string lpszAddress; //
>> public uint dwAddressType; //
>> public uint dwNumPlan; //
>> [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
>> public string lpszText; //
>> }
>
> http://www.vbdotnetforums.com/compact-framework-general-discussion/12293-problem-accessing-phonebook-visual-basic-net-2005-a.html :
>
> <StructLayout(LayoutKind.Sequential)> _
> Public Structure SimPhoneBookEntry
> Public cbSize As IntPtr
> Public dwParams As IntPtr
> Public lpszAddress As IntPtr
> Public dwAddressType As IntPtr
> Public dwNumPlan As IntPtr
> Public lpszText As IntPtr
> End Structure 'SimPhoneBookEntry
>
> -- 
>  saimhe