Article View: chile.comp.programacion
Article #1512Re: c++ ayuditaaa
From: John Vergara
Date: Fri, 21 Jul 2006 02:19
Date: Fri, 21 Jul 2006 02:19
72 lines
3073 bytes
3073 bytes
mmmmmmmmm
; no cache, me sali de c++ hace como 6 a�os
"Claudio Jara" <bluteufel@tutopia.com> escribi� en el mensaje
news:e6npvm$8ed$1@news.nivel5.cl...
> weno, en realidad explico un poquito m�s
> necesitaba pasar esa estructura
> a una api.. el tama�o definido para esta estructura
> deb�a ser 5 bytes. ni m�s, ni menos.
> tonz el c�digo en c me redimenciona (por lo visto) el largo del
> devicepath, con un largo aprox de 84 caracteres q era lo q necesitaba...
> pero esta wa, no cachaba como hacerla en vb... pens� en poner la
> estructura de:
>
> type PSP_DEVICE_INTERFACE_DETAIL_DATA
> dim dato1 as byte
> dim dato2 as string
> 5 bytes
> pero se caia
>
> dim dato1 as byte
> dim dato2() as byte
> 5 bytes, redim a dato2 con mi largo necesario...
> pero no me pesc�
>
> dim dato1 as byte
> dim dato2 as long
> 5 bytes
> copymemory buffer, varptr(Dato2)
> y pas�.. :]
>
> "Claudio Jara" <bluteufel@tutopia.com> escribi� en el mensaje
> news:e6nkb5$6re$1@news.nivel5.cl...
>> weno, lo q pasa q quer�a pasar eso a vb
>> pero si declaro un tipo x de string * 1 no puedo redimensionarlo..
>> soluci�n... punteros .. ju�e!
>>
>> saludos y gracias
>>
>> "Victor Alejandro Ramiro Cid" <vramiro@dcc.uchile.cl> escribi� en el
>> mensaje news:e6mg3c$41g$1@helcaraxe.dcc.uchile.cl...
>>> Claudio Jara <bluteufel@tutopia.com> wrote:
>>>> Hola, alguien sabe que hace esta cosa?
>>>>
>>>> teniendo la estructura:
>>>>
>>>> typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A {
>>>> DWORD cbSize;
>>>> CHAR DevicePath[ANYSIZE_ARRAY];
>>>> } SP_DEVICE_INTERFACE_DETAIL_DATA_A
>>>>
>>>> y declarando la variable "intf_detail"
>>>>
>>>> PSP_DEVICE_INTERFACE_DETAIL_DATA intf_detail = \
>>>> (PSP_DEVICE_INTERFACE_DETAIL_DATA)(new char[ReqLen]);
>>>
>>> Simplemente esta haciendo un cast del buffer de char's a la estructura
>>> SP_DEVICE_INTERFACE_DETAIL_DATA_A. Esas cosas se pueden hacer en c y c++
>>>
>>>>
>>>>
>>>
>>> --
>>> Saludos,
>>> Victor Ramiro
>>
>>
>
>
Technical Details
Message-ID:
<e9pdn3$ttg$1@news.nivel5.cl>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mailReferences:
<e6kom4$gc4$1@news.nivel5.cl> <e6mg3c$41g$1@helcaraxe.dcc.uchile.cl> <e6nkb5$6re$1@news.nivel5.cl> <e6npvm$8ed$1@news.nivel5.cl>Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,d6b453b73290e745 X-Google-Attributes: gid1593cb,public X-Google-Language: SPANISH,ASCII Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail From: "John Vergara" <john.vergara@vtr.net> Newsgroups: chile.comp.programacion Subject: Re: c++ ayuditaaa Date: Thu, 20 Jul 2006 22:19:40 -0400 Organization: Varios Lines: 74 Message-ID: <e9pdn3$ttg$1@news.nivel5.cl> References: <e6kom4$gc4$1@news.nivel5.cl> <e6mg3c$41g$1@helcaraxe.dcc.uchile.cl> <e6nkb5$6re$1@news.nivel5.cl> <e6npvm$8ed$1@news.nivel5.cl> NNTP-Posting-Host: 190.44.148.49 X-Trace: news.nivel5.cl 1153448483 30640 190.44.148.49 (21 Jul 2006 02:21:23 GMT) X-Complaints-To: news@news.nivel5.cl NNTP-Posting-Date: Fri, 21 Jul 2006 02:21:23 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Response