EldoS | Feel safer!

Software components for data protection, secure storage and transfer

StorageSearch Problem

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#1152
Posted: 09/07/2006 06:55:39
by Amit Shrivastava (Basic support level)
Joined: 09/07/2006
Posts: 3

Hi,
I need code examples regarding making instance pointer of StorageSearch structure in VC.Net. when i take the pointer of StorageSearch stuctuire with new operatore it genearte compiler error : cannot dynamically allocate a value type object with managed members on C++ (nogc) heap. i am trying it all in VC++.Net . the coding line is
SolFS::StorageSearch *SearchStruct = new SolFS::StorageSearch();
I need help. i want to know is this coding problem or other else.
#1158
Posted: 09/08/2006 02:29:16
by Alexander Plas (EldoS Corp.)

Hello

.NET version of SolFS compiled as managed C++ classes. If you like to use it in managed C++ code you should use little different syntax:
Code
SolFS::StorageSearch ^SearchStruct = gcnew SolFS::StorageSearch();


If you like to use SolFS in unmanaged C++ code you have to use SolFS classes for plain C++.
#1161
Posted: 09/11/2006 04:08:39
by Amit Shrivastava (Basic support level)
Joined: 09/07/2006
Posts: 3

Hi,
Thanks for your reply,
But it is still creating errors, i used that code
SolFS::StorageSearch ^SearchStruct = gcnew SolFS::StorageSearch();

errors are missing ';' before '^'

errors are looking irrelavent but when delete that code ,program compile sucscessfully,


what should i do for successfully compilation of tath code.
#1162
Posted: 09/11/2006 08:41:28
by Alexander Plas (EldoS Corp.)

Can you specify Compiler or IDE used to compile your sources. I'm using VS2005 and this code complies without any errors. Also check CLR options - clr:oldSyntax produce lot of errors on this code.
#1181
Posted: 09/12/2006 05:18:11
by Amit Shrivastava (Basic support level)
Joined: 09/07/2006
Posts: 3

Hi plas,
Thanks for your great responce.
I am useing Visual C++ .NET 2003(VC++ 7.1). In this IDE there is one option (property page->general tab) Use manaed extension. I kept it yes. but there is no any compiler option regarding /clr in Visual C++ .NET 2003 (7.1).

I think this is not problem with eldos because when i use code line
String ^str = gcnew String("Amit"); in my program ,i get same result
Errors : missing ';' before '^'.

So i want to know am i able to run that code on same compiler successfully or not ,and if yes than what changes will i have to made for that.
Thanks
Amit Shrivastava
#1259
Posted: 09/23/2006 05:45:24
by Eugene Mayevski (EldoS Corp.)

From the documentation:

Instances of a value type (see Classes and Structs (Managed)) that contain managed members can be created on the stack but not on the heap.


We will try to remove this "value" modifier from the code in future builds.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 5521 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!