Article View: chile.comp.programacion
Article #1776Re: c++ ayuditaaa
From: Claudio Jara
Date: Wed, 14 Jun 2006 01:49
Date: Wed, 14 Jun 2006 01:49
61 lines
2796 bytes
2796 bytes
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:
<e6npvm$8ed$1@news.nivel5.cl>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.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>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!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail From: "Claudio Jara" <bluteufel@tutopia.com> Newsgroups: chile.comp.programacion Subject: Re: c++ ayuditaaa Date: Tue, 13 Jun 2006 21:49:41 -0400 Organization: Varios Lines: 63 Message-ID: <e6npvm$8ed$1@news.nivel5.cl> References: <e6kom4$gc4$1@news.nivel5.cl> <e6mg3c$41g$1@helcaraxe.dcc.uchile.cl> <e6nkb5$6re$1@news.nivel5.cl> NNTP-Posting-Host: pc-128-126-86-200.cm.vtr.net X-Trace: news.nivel5.cl 1150249782 8653 200.86.126.128 (14 Jun 2006 01:49:42 GMT) X-Complaints-To: news@news.nivel5.cl NNTP-Posting-Date: Wed, 14 Jun 2006 01:49:42 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180