|
Like the other post mentioned they are only labels. ILDASM names them with an offset hint, but it has no semantic value, and doesnt take up space. Try for yourself, insert a few nop calls at the beginning of the method with jumps, the result of both methods will be the same.
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
leppie- thanks for your reply
Why then are they not sequential? Why for example does IL_0000 have IL_0003 next and not IL_0002?
What makes the 'code size' the size it is?
|
|
|
|
|
|
Hello all,
i made a runtime dataset and trying to delet a row from this data set is it update the row index in the dataset?
Thanks
hay
|
|
|
|
|
Not sure if this is the answer your looking for but:
DataSet dSet = new DataSet();
//fill table called "MyTable" here...
dSet.Tables["MyTable"].Rows[x].Delete();
|
|
|
|
|
problem:
1)how to create an UDP server for multiple clients.use multithreading or something else?
2)how to send messages over UDP to many servers at the same time.
thanks
|
|
|
|
|
I have a windows application in c#. I am required to create an html file and save on a certain directory.
At the moment I am writing the file using streamwriter.
But I do have a problem with the images in the file in deployment.
I notice that I have available when I add an item to the project to add html page. Does anyone know if that can be dynamically altered? or anyone have a better way to add an html page?
thank you
tephra
|
|
|
|
|
drey1 wrote:
I notice that I have available when I add an item to the project to add html page.
Sorry tephra, could you make that clearer?
|
|
|
|
|
Just to test, I created a simple html page and inserted a gif image. I was able to view it in a browser.
However, at first view, I can not do anything else with it. It seams static. I do not know how I can dynamically add any thing to it.
I am not sure that is the right way to go for me. ie. I am trying to create an index html file with links to PDF files, and those files will always change. So the html has to be dynamic.
thank you
|
|
|
|
|
You need to use relative paths in your HTML file that you're writing. I suggest using the Microsoft way of doing it, which is what happens when you save a page from Internet Explorer using the default settings: the HTML page is saved to disk and a folder is created with the same name and "_files" appended. In that directory are all the files that can be resolved (images, script files, etc.). When the HTML file is saved the path to those linked files are changed to a relative path - relative to the document, like so:
filename_files/img1.gif
filename_files/img2.jpg
Try it. Save a document with images to disk and examine both the file and the folder with the same name.
Using the same convention is consistent with other applications that use MSHTML (including IE, Word, FrontPage, and more), as well as other third-party libraries that want to provide a consistent user interface. Windows XP and newer platforms also allow users to manage both the HTML file and related folder as a single unit.
How you alter it is by parsing the text as you write it and changing what gets written, then skipping that portion of the text you're writing. You could also modify it before saving. It really just depends on your requirements and if you can modify the in-memory document.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I would like to know the best approach for sending information or a message from a DLL file back to the EXE file. Right now, the way I do it is pretty lame. I want to either pass a function pointer (I guess they are called delegates in C#) that I can pass to the dll upon linking. Or set up some sort of message system. Its easy to call functions from a dll, but how to I do it the other way around (cleanly)
Right now, I have some pointer to some object which has some event --its really fugly.
Thanks
|
|
|
|
|
|
|
Actually, I have a kind of similar problem. I really want to put a .dll into a process so that I can send it an object. I need it in a process because for whatever reason it does not behave properly in a thread. I don't know why this is.
When i put something like
Process testthis.StartInfo.FileName = "C:\\somefolder\\mydll.dll";
I got an exception on
testthis.Start();
saying its not a valid win32 application. I haven't had ANY luck using threads, so I have to do it like this. I was under the impression processes could handle .dlls, am i wrong?
Thanks a lot,
Jim
|
|
|
|
|
[...]
I was under the impression processes could handle .dlls, am i wrong?
Yes.
I suggest you do some basic reading on what is:
- a DLL
- an application
- a process
- a thread
mav
|
|
|
|
|
A DLL is not an EXE - you cannot launch it like an application. If you've ever written a managed application that actually compiles and runs, then you're only loading DLLs. All those types you use from the .NET Base Class Library - they're all defined in other DLLs (known as assemblies in the .NET world) and you load and use the types defined in them. So, if your DLL is managed just add a reference to it for your project (and I know I've been through that with you already) and use one of its types. Make sure the DLL and the EXE are in the same directory or the DLL is resolvable in other ways.
Read How the Runtime Locates Assemblies[^] in the .NET Framework SDK.
And mav.northwind is right - you really should read about the basics of computer software. Since you're in the .NET world, start by reading the Assemblies Overview[^].
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi guys im currently in the process of struggling with my first web application using C# and ASP.NET and im having a little trouble removing a collection(of around 20) of tickets from my database table it keeps crashing and givin me the following error message
[CODE]Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
I have included the problem code and I would really appreciate it if you would take a few mins to look at it thanks in advance
Tadhg88
[CODE]sqlDataAdapter3.Fill(concertDataSet1);
// declare a new DataTable called tickets and fill it with the data in the Ticket table
DataTable tickets = concertDataSet1.Tables["Ticket"];
//***work throught the list of tickets and find the selected one
foreach(DataRow myRow2 in tickets.Rows)
{
//*** check if the selected concert name matches
if(ConcertsListBox.SelectedItem.ToString() == myRow2[0].ToString())
{
//*** check if the selected performance name matches
if(PerformancesListBox.SelectedItem.ToString() == myRow2[1].ToString())
{
//*** delete the selected row
myRow2.Delete();
//*** break out of the foreach loop
//break;
}
}
}[/CODE]
|
|
|
|
|
|
Does anybody know if it is possible to write software that works across multiple monitors? and if so, is it possible to program one so it is private to the user / administrator and the other public. i.e they both show different things. Or even better- the private one shows both screens and the public one shows just what is meant to be seen.
If anybody could point me in the right direction of where to find out this info I would be very grateful
|
|
|
|
|
I think (and I'm not positive on this) that it is indeed very possible.
Just trying to recollect how to go about this (because i did read something about it at one point) I think your going to be dealing a lot with the adapters to the screens.
When you have a video card that supports multiple monitors, it refers to each device seperately *I think*. When you want to talk about one screen then you would ouptut to that screen, and vice versa. That data would not appear on the other screen. So, if you have one screen that you want to be private you just have to output all your graphics to that adapter.
Would this be a business app or something like a full screen app? When I talk about this stuff this was coming from a DirectX background, but I imagine its all very similar now.
I hope my convolution has helped at least a bit!
Jim
|
|
|
|
|
Thanks for your response, I had thought about DirectX after reading something similar. Do you recommend any articles about beginning using DirectX? It is a business application I am writing - a kind of waiting notification like the one Argos have.
Thanks for your help
|
|
|
|
|
I'm not 100% sure if I understand what you want, but there's explicit support in the framework for multiple monitors/screens.
Take a look at the Screen class. You can query the number of displays, for example, or retrieve the available desktop space.
How many displays are reported here should depend on the graphic drivers. They can tell Windows that there are two separate screens or that there's only one screen with twice the resolution.
mav
|
|
|
|
|
Hello,
I have a data grid, and l want to added some records some text boxes into the grid. I have 3 text boxes and the user might want to add the contents 1, 2, 3, or 4 times.
Example:
Enter data in the text boxes, and enter the number of rows you want added. So if the user enters 3 and then click a button, than the data in the text boxes will be entered on 3 different rows. The data will be repeated on 3 rows.
Is there a way to do this using the datagrid?
Many thanks in advance,
Steve
|
|
|
|
|
Don't try to manipulate the grid itself, instead, add the rows to your bound dataset.
- DougW48
|
|
|
|
|
Hi!
I need a good method to remove multiple blanks from a string and replace them with a single blank. For example: "This is a string" -> "This is a string". The method I am using now works fine but is a bit resource demanding (about 80% of the thread).
public static string RemoveMb (string strIn) // Remove multiple blanks
{
string search = @"\s+";
string replace = @" ";
strIn = Regex.Replace(strIn, search, replace);
return strIn;
}
Anyone know of a better method?
Best regards,
Daniel
|
|
|
|