|
-
November 23rd, 2003, 03:48 PM
#1
SAFEARRAY problem
this code works fine if i create a 2 or 3 dimensional array.
but if i try to make a safearray with 9 dimension m_parray goes to NULL.
I dont know if i'm doing something wrong or simply Safearrays
doesn't support more than 3 dimensions.
Can someone help me?
Thanks in advance
SAFEARRAYBOUND *arrayBounds;
long nDims = 9;
arrayBounds = new SAFEARRAYBOUND [nDims];
for ( i = 0; i < nDims; i++ ) {
arrayBounds[i].lLbound = 0;
arrayBounds[i].cElements = 15
}
SAFEARRAY *m_parray = SafeArrayCreate(VT_VARIANT, nDims, arrayBounds); // m_parray is NULL after the call
-
November 23rd, 2003, 06:04 PM
#2
Only thing I can think of is that there is no enough memory to create the 9-D array.
csheng
-
November 24th, 2003, 02:36 AM
#3
It's because of 15*15*...*15 (9 times) of byte array is already great than 38GB memory. But you have the VARAINT array for which it's required more than 600GB. Be easier.
With best wishes,
Vita
-----------------------
Russian Software Development Network -- http://www.rsdn.ru
-
November 24th, 2003, 05:12 AM
#4
I don't know exactly what you want, this code will run:
SAFEARRAYBOUND *arrayBounds;
ong nDims = 19;
arrayBounds = new SAFEARRAYBOUND [1];
arrayBounds[0].lLbound = 0;
arrayBounds[0].cElements = 15;
SAFEARRAY *m_parray = SafeArrayCreate(VT_VARIANT, nDims, arrayBounds);
Quang
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|