Click here to Skip to main content
15,912,897 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: readxml with dataset Pin
lavy288322-May-07 5:31
lavy288322-May-07 5:31 
GeneralRe: readxml with dataset Pin
Hamid_RT22-May-07 7:40
Hamid_RT22-May-07 7:40 
AnswerRe: AfxMessageBox and Strings!!! Pin
led mike14-May-07 4:51
led mike14-May-07 4:51 
QuestionHow to pass a function as an argument to other function Pin
subramanyeswari14-May-07 3:12
subramanyeswari14-May-07 3:12 
AnswerRe: How to pass a function as an argument to other function Pin
led mike14-May-07 4:53
led mike14-May-07 4:53 
GeneralRe: How to pass a function as an argument to other function Pin
subramanyeswari14-May-07 18:34
subramanyeswari14-May-07 18:34 
AnswerRe: How to pass a function as an argument to other function Pin
Hamid_RT22-May-07 2:01
Hamid_RT22-May-07 2:01 
QuestionComplicated array problem Pin
NeoCoded14-May-07 2:17
NeoCoded14-May-07 2:17 
Hello,

first off, bear with me as i posted this question on another newsgroup a couple of hours ago (but my thread does not look like getting answered during the next week).

So here's the problem. I tried to translate this c# example to c++/cli:

CustomVertex.PositionNormalTextured[] verts =<br />
        (CustomVertex.PositionNormalTextured[])_mesh.VertexBuffer.Lock( 0,<br />
        typeof( CustomVertex.PositionNormalTextured ),<br />
        LockFlags.None,<br />
        _mesh.NumberVertices );<br />

Looks simple and should be simple to translate. But...

array<Direct3D::CustomVertex::PositionNormalTextured, 1>^ myVertices = gcnew<br />
array<Direct3D::CustomVertex::PositionNormalTextured, 1><br />
(myMesh->NumberVertices);<br />
myVertices = safe_cast<array<Direct3D::CustomVertex::PositionNormalTextured,<br />
1>^> (myMesh->VertexBuffer->Lock(0,<br />
Direct3D::CustomVertex::PositionNormalTextured::typeid,<br />
Direct3D::LockFlags::None));<br />

gives me an IndexOutOfRangeException.
So i think i have to use gcnew in the second line. But how?
I just can't figure out the right syntax to solve this problem.
Or is there just something else wrong?

I hope, someone is able to help me on this.

AnswerRe: Complicated array problem Pin
Mark Salsbery14-May-07 5:29
Mark Salsbery14-May-07 5:29 
GeneralRe: Complicated array problem Pin
NeoCoded14-May-07 6:17
NeoCoded14-May-07 6:17 
GeneralRe: Complicated array problem Pin
Mark Salsbery14-May-07 6:24
Mark Salsbery14-May-07 6:24 
Questioncannot convert from CString* to CString& Pin
subramanyeswari14-May-07 0:29
subramanyeswari14-May-07 0:29 
AnswerRe: cannot convert from CString* to CString& Pin
prasad_som14-May-07 0:41
prasad_som14-May-07 0:41 
GeneralRe: cannot convert from CString* to CString& Pin
subramanyeswari14-May-07 0:55
subramanyeswari14-May-07 0:55 
AnswerRe: cannot convert from CString* to CString& Pin
Mark Salsbery14-May-07 5:34
Mark Salsbery14-May-07 5:34 
GeneralRe: cannot convert from CString* to CString& Pin
originSH14-May-07 6:31
originSH14-May-07 6:31 
GeneralRe: cannot convert from CString* to CString& Pin
Mark Salsbery14-May-07 6:39
Mark Salsbery14-May-07 6:39 
Questionarrays Pin
Debun13-May-07 9:32
Debun13-May-07 9:32 
AnswerRe: arrays Pin
Dave Doknjas13-May-07 12:03
Dave Doknjas13-May-07 12:03 
GeneralRe: arrays Pin
Debun13-May-07 12:33
Debun13-May-07 12:33 
AnswerRe: arrays Pin
Christian Graus13-May-07 12:13
protectorChristian Graus13-May-07 12:13 
QuestionRuntime error for OpenFileDialog Class in .NET 2005 Pin
priyank_ldce13-May-07 6:13
priyank_ldce13-May-07 6:13 
AnswerRe: Runtime error for OpenFileDialog Class in .NET 2005 Pin
Mark Salsbery13-May-07 6:33
Mark Salsbery13-May-07 6:33 
QuestionBasic terminology questions Pin
J_E_D_I12-May-07 7:41
J_E_D_I12-May-07 7:41 
AnswerRe: Basic terminology questions Pin
CPallini12-May-07 8:26
mveCPallini12-May-07 8:26 

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.