Dear Fabian,
I have converted this to VB.NET and removed the DllImport attribute...this
seems to solve the GC-ed pointer problem...but still the return buffer is
not as desired.
The complete code is:
>
Imports System
Imports System.Text
Imports System.Runtime.InteropS
Have a look at
http://www.dotnetremoting.cc/DisplayPage.aspx?key=OSR_BiDirTcpChannel
This could take care of the NAT problem. I'm sure there is another
project that has the same idea, but I can't find a link to it at the
moment.
Another one to look at, that looks like it is a bit more complete i
Make your PageIndexChanged method protected.
Chad
On Tue, 2 Sep 2003 14:58:59 -0400, Vibhu <[EMAIL PROTECTED]> wrote:
>I am trying to use a datagrid paging feature . I get a CS0122
>PageIndexChanged(object,
>System.Web.UI.WebControls.DataGridPageChangedEventArgs)' is inaccessible
>due to its pro
> Don't you agree?
I'd have to disagree with you here. While your assumption may be correct
about not many of the programmers knowing about the use of
IFormatProvidor, but they should know that by doing ToString( "C" )
they've done something that isn't normal, and therefore they might have
to do s
I am trying to use a datagrid paging feature . I get a CS0122
PageIndexChanged(object,
System.Web.UI.WebControls.DataGridPageChangedEventArgs)' is inaccessible
due to its protection level)
I have the following lines in the aspx page
asp:datagrid id="SearchDataGrid" runat="server" Width="664px"
Cs
I think it isn't symmetric.
I mean, take a pool of programmers that just know the standard format
characters ("C", "R", "X",...) - they can do ToString("C") and they know
what it means - then count how many of them know about NumberStyles and
IFromatProvider (probably less then 20%) - they can do
I can agree with you Gaurav and Robin but I think that there are two other
options that make ToString and Parse more symmetric:
1) do not accept "C" format for a Decimal, that is Decimal.ToString("C")
should throw a FormatException as it do for "R", "X", etc.
2) actually Decimal.Parse(string) imp
On Tue, 2 Sep 2003 13:04:31 -0500, Robin Debreuil <[EMAIL PROTECTED]> wrote:
>How can it derive that you mean a currency from just a string?
By the currency symbol, i.e. "$1,237,129,843.00" with en-US culture and
"L. 1.237.129.843" with it-IT culture.
ciao, (luKa)
http://nullabletypes.sourceforg
How can it derive that you mean a currency from just a string? Realistically
you would need culture in there too - some places use 100.000 instead of
100,000 with money iirc, or the negative sign after the number, among other
anomalies.. I would say making you specify all this is a better behaviour
> Why ToString and Parse methods of Decimal type are not symmetric?
> I think this non symmetric design is a bad design because a
But it is symmetric. You did:
string s = d.ToString( "C" ); // specify a "C" instead of
default
and then you did
Decimal r = Decimal.Parse( s ); // lea
Hi!
If you have a look at the implementation of "Decimal.Parse(string)", you
will see that it attempts to parse the string as a number
(NumberStyles.Number), but when you specify "NumberStyles.Currency",
apparently, the treatment of the passed numeric value changes.
I couldn't delve any deeper si
When I use ToString with a Decimal in this way
Decimal d = 1237129843M;
string s = d.ToString("C");
the following way to parse string 's' do NOT work:
Decimal r = Decimal.Parse(s);
indeed I get a FormatException.
To parse 's' I _have_ to do this way:
Decimal r = Decimal.Parse(s
> Now the problem is .How to call this Double pointer.in Dotnet..Any
> idea?
Would it not need to be an out parameter?
I'm confused. You say that the wrapper generated the following:
> void Decode ( string bstrData , int nSize , System.IntPtr ppData )
but you're making the call as:
>
I did this with a double * instead of a byte *, so the code should be
similar.
The code is described below:
// C Code
typedef struct{
char ticker[32];
int date;
int ticks;
bool error;
int error_code;
char error_msg[256];
double *trades; // th
I have a COM class which has the following function in one of its interface.
HRESULT Decode([in] BSTR bstrEncodedData, [out] LONG *plSize, [out,size_is(,
*plSize)] BYTE **ppbData);
I created the wrapper class using Add Reference in solution explorer and the
function COM definition now changed as f
Hi
I have a small problem I don't seem to manage very well. The thing
is that I would like to retrive two instances of a program (two
instances of the program are running) that is registered in the ROT.
The code I have used is this:
private ArrayList GetObjectsFromROT()
{
ArrayList fireobj=new Arra
16 matches
Mail list logo