Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
GeneralRe: sorting an ArrayList with different attributes Pin
Mostafa Siraj4-Dec-06 11:32
Mostafa Siraj4-Dec-06 11:32 
GeneralRe: sorting an ArrayList with different attributes Pin
Christian Graus4-Dec-06 11:42
protectorChristian Graus4-Dec-06 11:42 
GeneralRe: sorting an ArrayList with different attributes Pin
sanjaybs20014-Dec-06 21:06
sanjaybs20014-Dec-06 21:06 
GeneralRe: sorting an ArrayList with different attributes Pin
Christian Graus4-Dec-06 23:14
protectorChristian Graus4-Dec-06 23:14 
AnswerRe: sorting an ArrayList with different attributes Pin
Russell Jones4-Dec-06 21:02
Russell Jones4-Dec-06 21:02 
QuestionAccessViolationException was Handled Pin
Pokkri4-Dec-06 10:02
Pokkri4-Dec-06 10:02 
AnswerRe: AccessViolationException was Handled Pin
Christian Graus4-Dec-06 10:12
protectorChristian Graus4-Dec-06 10:12 
GeneralRe: AccessViolationException was Handled Pin
Pokkri5-Dec-06 1:08
Pokkri5-Dec-06 1:08 
DLL Function in VC++
This is actullay contained 38 parameters.

void Testing_Function
(

coordpt **polygons, /*polygon shapes*/
int *polygons_vertex_num, /*polygon vertex numbers*/
double *polygons_rotation_angle , /*polygon rotation angles*/
int *polygons_flip, /*polygon flip information*/
double *polygons_rotation_tolerance, /*polygon rotation tolerances*/
int *polygons_placement_group, /*polygon placement groups
int polygons_num, /*number of polygons*/
double surface_width, /*width of the surface*/
double surface_pattern, /*pattern on the surface*/
double x_rapport, /*pattern repeat in x-direction*/
double y_rapport, /*pattern repeat in y-direction*/
double x_rapport_offset, /*offset of first plaid line*/
double y_rapport_offset, /*offset of first stripe line*/
int layer_type, /*layer type*/
int layer_type_length_option, /*option for length measuring*/
coordpt **holes, /*holes in the surface*/
int *holes_vertex_num, /*vertex numbers of the holes*/
int holes_num, /*number of holes in the surface*/
int product_type, /*type of product*/
int number_of_product_pieces, /*number of products*/
int marker_combi_type, /*type of stencil combination*/
double allowed_time, /*allowed processing time*/
double termination_yield, /*termination yield*/
int (*manual_interrupt)(), /*manual interrupt*/
int (*intermediate_solution)(), /*output of intermediate solutions*/
int (*error_message)(), /*output of error messages*/
nesting_constraint_type *constraints, /*placement constraints*/
int constraints_number, /*number of constraints*/
int *polygon_placed, /*return: polygon placed or not*/
double *x_translation, /*return: x-translations*/
double *y_translation, /*return: y-translations*/
double *rotation, /*return: rotations*/
int *flip, /*return: flip information*/
double *marker_length1, /*return: front marker length*/
double *marker_length2, /*return: back marker length*/
double *marker_yield, /*return: yield of the marker*/
int dump /*dump option*/


)



but from c# , we are importing this dll function as below
[DllImport("Test-T.dll", EntryPoint = "Test_Function", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]

void Testing_Function(


ref coordpt[,] polygons,
ref int[] polygons_vertex_num,
ref double[] polygons_rotation_angle,
ref int []polygons_flip,
ref double []polygons_rotation_tolerance,
ref int []polygons_placement_group,
int polygons_num,
double surface_width,
double surface_pattern,
double x_rapport,
double y_rapport,
double x_rapport_offset,
double y_rapport_offset,
int layer_type,
int layer_type_length_option,
ref coordpt[,] holes, ref int[] holes_vertex_num,
int holes_num,
int product_type,
int number_of_product_pieces,
int marker_combi_type,
double allowed_time, double termination_yield,
ref int manual_interrupt,
ref int intermediate_solution,
ref int error_message,
ref Nesting_Constraint_Type[]constraints, int constraints_number,
ref int[] polygon_placed,
ref double[] x_translation,
ref double[] y_translation,
ref double[] rotation,
ref int[] flip,
ref double[] marker_length1,
ref double[] marker_length2,
ref double[] marker_yield,
int dump


);


and we calculated every parameter from c# and called the Testing_Function.

At called function (Testing_Function ),it is giving error as

AccessViolationException was Handled
---------------------------------------

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

plz help me out for this problem.



QuestionFast loading images to a ImageList... Pin
Marcos Hernandez4-Dec-06 8:43
Marcos Hernandez4-Dec-06 8:43 
AnswerRe: Fast loading images to a ImageList... [modified] Pin
Luc Pattyn4-Dec-06 9:08
sitebuilderLuc Pattyn4-Dec-06 9:08 
GeneralRe: Fast loading images to a ImageList... Pin
Marcos Hernandez4-Dec-06 9:46
Marcos Hernandez4-Dec-06 9:46 
GeneralRe: Fast loading images to a ImageList... Pin
Luc Pattyn4-Dec-06 10:13
sitebuilderLuc Pattyn4-Dec-06 10:13 
GeneralRe: Fast loading images to a ImageList... Pin
Marcos Hernandez4-Dec-06 10:15
Marcos Hernandez4-Dec-06 10:15 
QuestionPlease Help me!!!Thanks !!! Pin
vandaivn4-Dec-06 8:21
vandaivn4-Dec-06 8:21 
AnswerRe: Please Help me!!!Thanks !!! Pin
Not Active4-Dec-06 9:30
mentorNot Active4-Dec-06 9:30 
AnswerRe: Please Help me!!!Thanks !!! Pin
Guffa4-Dec-06 10:44
Guffa4-Dec-06 10:44 
Questionhow to add excel like autofilters to datagrid header using c#.net Pin
nalla484-Dec-06 7:20
nalla484-Dec-06 7:20 
QuestionUsing .NET to call Matlab, How to pass array of strings? Pin
Woody Davis4-Dec-06 7:12
Woody Davis4-Dec-06 7:12 
QuestionExposing Children From Persistent Storage Pin
Christian M Jensen4-Dec-06 6:59
Christian M Jensen4-Dec-06 6:59 
AnswerRe: Exposing Children From Persistent Storage [modified] Pin
Pete O'Hanlon4-Dec-06 9:20
mvePete O'Hanlon4-Dec-06 9:20 
QuestionPrintPreview Pin
netJP12L4-Dec-06 5:17
netJP12L4-Dec-06 5:17 
AnswerRe: PrintPreview Pin
Nader Elshehabi4-Dec-06 6:56
Nader Elshehabi4-Dec-06 6:56 
GeneralRe: PrintPreview Pin
netJP12L4-Dec-06 7:55
netJP12L4-Dec-06 7:55 
QuestionRedim multiD-Array Pin
C++NewBe4-Dec-06 4:33
C++NewBe4-Dec-06 4:33 
AnswerRe: Redim multiD-Array Pin
Pete O'Hanlon4-Dec-06 4:59
mvePete O'Hanlon4-Dec-06 4:59 

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.