I'm currently writing a C# application that does a lot of digital signal processing, which involves a lot of small fine-tuned memory xfer operations. I wrote these routines using unsafe pointers and they seem to perform much better than I first thought. However, I want the app to be as fast as possible.
Would I get any performance benef...
This may be a repeat of the following unanswered question:
Help with bitmap lock - Format8bppIndexed
I'm locking an image in the following manner:
// PixelFormat is 8BppIndexed in my case.
Bitmap bmp = new Bitmap("mySampleImage.tif");
// ClipRectangle will be a Rectangle such as {x=128, y=290, width=250, height=200},
// selecte...
I'm reading from a byte array as follows:
int* i = (int*)p;
id = *i;
i++;
correct me if I'm wrong, but ++ has precedence over *, so is possible to combine the *i and i++ in the same statement? (e.g. *i++)
(this is technically unsafe C#, not C++, p is a byte*)
...
I have a multidimentional array of pointers to integer (of unknown rank) being passed into my function as such:
public unsafe static void MyMethod(Array source, ...)
{
//...
}
Multidimensional arrays of pointers are being constructed outside of the method and being passed in. Here's an example:
int*[,,,] testArra...
Hi,
How can I read the error string in C# from this C++ dll call?
//
// PARAMETERS:
// objptr
// Pointer to class instance.
//
// pBuffer
// Pointer to buffer receiving NULL terminated error message string.
// If this value is zero, the function returns the required buffer size, in bytes,
// and makes no use of the pB...
My C# application uses pointers and hence is complied using the "Allow Unsafe Code" setting.
I know that it is quite difficult or not possible at all to run such an application from a network location.(or is there any way to run it??)
What I would like to know is, is there any way to handle the error that occurs while trying to run this...
hi,
i am very new to c++. i am getting system crash (not compilation error) in doing following:
i am declaring global pointer of class.
BGiftConfigFile *bgiftConfig;
class BGiftConfigFile : public EftBarclaysGiftConfig { }
in this class i am reading tags from xml file. it is crashing system when this pointer is used to retrieve va...
Is it possible to pass an integer as reference at class initialization and safe the reference?
class Foo {
private int _refVal;
public Foo(ref int val) {
_refval = val; // saves the value, not the reference
}
}
I could use pointers, but then I need an unsafe context.
...
class someClass
{
public:
int* ptr2Int;
};
Is this a valid class (yes it compiles)? Provided one assigns a value to ptr2Int before dereferencing it, is the class guaranteed to work as one would expect?
...