|
Hi Leppie,
What is this crazy idea of yours to build a VM on top of the VM of .NET ?
Nevertheless, thank you for sharing with me your researches.
By the way, for your nBass project, the BASS library has just been updated to 1.8a.
Cheers,
R. LOPES
Just programmer.
|
|
|
|
|
This does the job perhaps:
.method private hidebysig static void*
GetAddr(object& o) cil managed
{
.maxstack 1
ldarg.0
ret
}
You need to pass a ref object, so cast the 'o' to object.
GriffonRL wrote:
What is this crazy idea of yours to build a VM on top of the VM of .NET ?
Just what you say: Crazy! But the ideas change all the time! The new idea is to have a Side by Side VM, with a different IL language (read more simplified).
GriffonRL wrote:
By the way, for your nBass project, the BASS library has just been updated to 1.8a.
Thnx, I havent worked with it for ages... maybe when I'm bored...
<a TITLE="See my user info" href=http:
|
|
|
|
|
Actually from that previous IL method it appears that when passing any object by ref, the CLR creates a pointer that holds the object, still not what you are looking for though.
<a TITLE="See my user info" href=http:
|
|
|
|
|
OK here is what works:
.method private hidebysig static void*
GetAddr(object& o) cil managed
{
.maxstack 1
ldarg.0
conv.u
ret
}
Output from Cordbg (after calling meth, but passing only c1, NOT ref c1):
object c1 =(0x00c41910) <testing.class1>
void* h = 0x00C41910
I cant see a way to do this via C# though.
<a TITLE="See my user info" href=http:
|
|
|
|
|
Here is a full sample, see the comments:
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
.ver 1:0:3300:0
}
.assembly Testing
{
.hash algorithm 0x00008004
.ver 1:0:1272:38245
}
.module Testing.exe
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x00400000
.subsystem 0x00000003
.file alignment 512
.corflags 0x00000001
.namespace Testing
{
.class private auto ansi beforefieldinit Class1
extends [mscorlib]System.Object
{
.method private hidebysig static void
Main(string[] args) cil managed
{
.entrypoint
.custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01 00 00 00 )
.maxstack 1
.locals ([0] object c1,
[1] void* h,
[2] int32 i)
newobj instance void Testing.Class1::.ctor()
stloc.0
ldloc.s c1
call void* Testing.Class1::GetAddr(object&)
stloc.1
ldc.i4.5
stloc.2
ldloca 2
call void* Testing.Class1::GetAddr(object&)
stloc.1
ret
}
.method private hidebysig static void*
GetAddr(object& o) cil managed
{
.maxstack 1
ldarg.0
conv.u
ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 1
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
}
}
I dont know how one would call a ref object without adding the ref keyword in C#???
leppie::AllocCPArticle(Generic DFA State Machine for .NET);
|
|
|
|
|
Hi Leppie,
I'm amazed !
Thank you very much for this. Coding at the IL level looks very hardcore for me . Good for you. .NET has no secret for you .
Cheers,
R. LOPES
Just programmer.
|
|
|
|
|
I want to convert word docs to XML in my app...
Anyone has any ideas?
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
Try MS Office 2003 SDK.
"...if you don't want to hear things that piss you off don't piss off other people. SIMPLE." - Steven Hicks This signature was created by "Code Project Quoter".
|
|
|
|
|
Microsoft Word XML Content Development Kit.[^]
WordML Opens Up the Word File Format
Word 2003 can use standards internally as well as externally. When you save a Word document, one of your choices is to save it as an XML file. By default, this will use Word's own XML schema, informally called WordML. WordML is now a completely open, non-binary format that captures all of the information and formatting from a document. For the complete WordML schema, download the Microsoft Word XML Content Development Kit.
"...if you don't want to hear things that piss you off don't piss off other people. SIMPLE." - Steven Hicks This signature was created by "Code Project Quoter".
|
|
|
|
|
Does c# support the "throws" keyword at method declaration?
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
No, this aint Java!
<a TITLE="See my user info" href=http:
|
|
|
|
|
yup coz I found out that it supprts the same functionality without using the throws keyword...
If I understood that properly the Exception bubbles up until it is caught...
This is much better!!
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
Hi all,
Here's my problem:
I have a webservice that works fine from a normal win forms apps, but if I try to to call it from a windows service on the same machine it just hangs. The strange thing is that it hangs on the line where the webservice object is created (MyWebservice objWS = new MyWebservice()). The webservice url is the same for both. The windows service runs fine apart from this, I've tried installing it to log on as the domain administrator and the same domain user that is logged on to the machine. I'm using windows 2000 and version 1.0 of the .net framework (1.0.3705).
Any ideas?
Regards
Andy
|
|
|
|
|
Hi. I created winform application.
And There is a empty tabcontrol. When i click menuitem to add tabpage,
i create tabpage and add tabpage to tabcontrol.
It is simple.^^
But, What i want to do is to hadle tabpage focus.
When i press mouse right button on a tabpage,the tabpage must have focus and
show the context menu. when i clicked context menu to close tabpage,that tabpage must be closed.
I don't know how to get the tabpage reference,when i press a right mouse button. Would you tell me the way to solve this problem?
As soon as possibe,i hope you write sample codes.
Help me,please.
|
|
|
|
|
Hi All!!
I have binded my text fields to DataColumns of table at runtime.In data navigation mode, all text fields of my application are disabled. When I press the 'Add New' button, all fields are enabled and cleared.
Problem is that when I focus to next control, all the data of current record is again loaded in all textboxes . While I want to remain them clear.
plzzzzzzzzzzzzzzzzz help me.
Thanx in Advance
sorry for my bad English.
|
|
|
|
|
Hi,
A few seconds past I asked to access a toolbar with
shortcuts.
Now I want also find a solution for followin problem :
My Form consists of a panel, in that panel I have other
panels (a panel for the header, for the footer and one for
the body). These subpanels have some controls.
Now, I also want to access the subpanel (ex. the
footerpanel) with a shortcut key and then use the arrow-
keys too scroll in the controls of that panel.
Is there somebody who have a hint?
Thanks in advance,
Vic
.
|
|
|
|
|
Hi,
I have a windows form with a toolbar and some other
controls.
Normally you access the toolbar-members with the mouse.
But how can you access the toolbar with a shortcut (lets
say for example Alt-T). So, you are positioned on the
first member, And too access the other members you have
(you could) to use the arrow-keys.
I need this things for the case that the mouse is broken.
Thanks,
Vic
.
|
|
|
|
|
I created a custom control derived from Control but it doesn't seem to have the default focus behaviour (i.e. mouse click inside the control gives it focus). If I add a handler for OnGotFocus it never gets called.
How can I make it respond to focus events?
|
|
|
|
|
Hi guys, i'm sorry for this post since it's clear i still haven't grasped the big picture of how this works yet, so please forgive my ignorance...i'm still very new to c#.
Can someone explain to me how i can use this code to connect to a database and display records? i'm not worried about the db connectivity, since i have that part working, but i am having a problem understanding how to use this code in sections...
for instance, i want to open a dbconnection, then run a sql query based on user input, then close the connection. The only way i know how to do this is to create ONE method that opens the database, executes the query, then closes it again. I'd rather do it in sections like what i have, but maybe that it isn't the best programming...any input on how i can structure this would be helpful.
thanks.
namespace CreateConnection<br />
{<br />
public class dbcon<br />
{<br />
String _dbString;<br />
<br />
public dbcon(String _dbString)<br />
{<br />
OdbcConnection dbConnect = new OdbcConnection(_dbString);<br />
}<br />
<br />
public void dbopen()<br />
{<br />
dbConnect.Open();<br />
}<br />
<br />
public void dbquery(String _dbquery)<br />
{<br />
String output = "";<br />
<br />
OdbcCommand cmd = new OdbcCommand("",dbConnect);<br />
cmd.CommandText = _dbquery;<br />
OdbcDataReader dr = cmd.ExecuteReader();<br />
<br />
while(dr.Read())<br />
{<br />
for(int i=0;i<dr.FieldCount;i++)<br />
{<br />
output = output + dr.GetValue(i) + ",";<br />
}<br />
output = output + "\r";<br />
}<br />
<br />
dr.Close();<br />
}<br />
<br />
public void dbclose()<br />
{<br />
dbConnect.Close();<br />
}<br />
}<br />
}
.gonad.
|
|
|
|
|
...thanks, but i figured it out myself.
.gonad.
|
|
|
|
|
What's the difference between LocationChanged and Move events for Controls?
The documentation isn't very clear, but it reads as if LocationChanged is a superset of Move, but it seems that in practice both are called at the same time, except that Move events are fired just before LocationChanged events, perhaps.
It looks like I'll be using LocationChanged, to be safe, but if there are any suggestions otherwise, I'll take 'em!
Thanks,
Arun
|
|
|
|
|
Hi,
I'm really not sure where and how to strt .net & C#
ANY GOOD SITES...???
Rgds
Srinivas
|
|
|
|
|
um...you could try this.
Hey don't worry, I can handle it. I took something. I can see things no one else can see. Why are you dressed like that?
- Jack Burton
|
|
|
|
|
This[^] is better .
i'm only pointer to myself
|
|
|
|
|
iv been trying to find some reasonable info on how to Bind DataBase Field to Column BackColor Property.
this only binds the data grids main properties back color but i need the individual Column to be bound.
dataGrid1.DataBindings.Add("BackColor",DataSource,"DataSource.Field");
Does what is below have anything that can lead me to it?????
// Use a PropertyDescriptor to create a formatted column.
PropertyDescriptorCollection myPropertyDescriptorCollection = BindingContext
[myDataSet, "Table.Field"].GetItemProperties();
// Create a formatted column using a PropertyDescriptor.
DataGridColumnStyle csField =
new DataGridTextBoxColumn(myPropertyDescriptorCollection["Property"], "c", true);
csField.MappingName = "Property";
|
|
|
|