|
So what do i have to do to make my friends connect to me !!! and i want to be able to connect to any ip address on the internet by knowing the ip address and the port number ???? like any remote administration tool like subseven or prorat or any others how could they do that ?
i need clients in voice session , the voice is directed to each one pc without the interfere of the server it will be so heavy for the server to handle text and voice at the same time
Mess With The Best And Die Like The Rest
|
|
|
|
|
This does appear to work, however is this really how you're supposed to do it:
I'm calling the WinSpool API method EnumPrinterDrivers:
[DllImport("winspool.drv", CharSet=CharSet.Ansi, SetLastError=true)]
public static extern bool EnumPrinterDrivers
(
[MarshalAs(UnmanagedType.LPWStr)] string pName,
[MarshalAs(UnmanagedType.LPWStr)] string pEnvironment,
uint Level,
IntPtr pBuff,
uint cbBuf,
out uint pcbNeeded,
out uint pcReturned
);
In C speak The pBuff would be a pointer to an array of DRIVER_INFO_1 structs. I have declared these as:
[StructLayout(LayoutKind.Sequential)]
public struct DRIVER_INFO_1
{
[MarshalAs(UnmanagedType.LPStr)] public string sName;
}
Heres my method, it's the pointer arithmatic that I'm curious about, seems to be very clumsy:
public static unsafe string[] ListPrinterDrivers()
{
string[] arrDrivers = new string[]{};
try
{
uint nNeeded = 0;
uint nCount = 0;
IntPtr ptrData = IntPtr.Zero;
//how much do I need
EnumPrinterDrivers(null, null, 1, ptrData, 0, out nNeeded, out nCount );
if ( nNeeded > 0 )
{
//alloc space for array
ptrData = Marshal.AllocHGlobal((int)nNeeded);
bool bOK = EnumPrinterDrivers(null, null, 1, ptrData, nNeeded, out nNeeded, out nCount );
if ( bOK && nCount > 0 )
{
arrDrivers = new string[nCount];
IntPtr ptrArrStructs = ptrData;
for ( int idx=0; idx< nCount; idx++ )
{
DRIVER_INFO_1 dinfo = (DRIVER_INFO_1)Marshal.PtrToStructure(ptrArrStructs, typeof(DRIVER_INFO_1));
System.Diagnostics.Debug.WriteLine("Got Printer driver: " + dinfo.sName );
arrDrivers[idx] = dinfo.sName;
//
//OK so now I increment the pointer. Is there a better way
//
int nSize= Marshal.SizeOf(dinfo);
byte* ptrStruct = (byte*)ptrArrStructs.ToPointer();
ptrStruct += nSize;
ptrArrStructs = new IntPtr((void*)ptrStruct);
}
}
Marshal.FreeHGlobal(ptrData);
}
}
catch ( Exception exp )
{
System.Diagnostics.Debug.WriteLine(exp.ToString());
}
return arrDrivers;
}
|
|
|
|
|
Hi there,
I have a form with a data grid. when i click on the header portion, an arrow is shown there wrt the order of sorting . I'm planning to do a multi column sorting. I'l be usinb a key (shift/Ctrl) to select the columns.
When i select more than one column using a particular key, the arrow should be there on all the selected columns headers.
Is there a way to show the arrow on multiple column headers???
Thanks
Els
|
|
|
|
|
Hi All,
I have an application which navigate a URL in AxWebBrowser. According to my application the URL will be navigated for more than 1000 times. I am clearing the cache after every navigation.
The problem is... when I start executing the application and open any other page and again trying to view the execution the window is not shown properly.
Can any body please help me in this case?
Thanks in Advance
Jaya
|
|
|
|
|
Is there a way to programaticaly add a .gif image toa richtextbox. I found an article that is using the rtf pecifications but I am just a beginer and I can`t understand wery well the code. Is there an easyer way?
|
|
|
|
|
I'm looking for a way to bypass the Outlook Object Model Guard via C#, without Redemption.
The sharing of good or bad things between living beings, is what accounts for happiness or suffering.
|
|
|
|
|
The security is pretty tight. Without Redemption you have to write the bypasses yourself. Check the Redemption info to see what protocol they use for their "SafeMailItems". I used to know what it was, but I know its not MAPI. It is a big undertaking and you may well be better off just getting the Redemption redistributable. I seriously doubt it will be a simple solution to bypass SP2 security.
C#Guy
|
|
|
|
|
Hello,
I try to get the SUM out of the values of an Excel.range
like: range2[1,1] = SUM(range1);
Thanks
|
|
|
|
|
how to serialize a folder
|
|
|
|
|
Please clarify. Do you want to package the contents of a folder (including files and files under subfolders) as a binary file?
Option A: You can Zip them using SharpZipLib
Option B:
Instantiate an object of type Hashtable.
Recursively traverse through the directory and subdirectories.
Read the file contents and push it as the value in the hashtable using file name as the key.
Implement your custom serialization for hashtable.
|
|
|
|
|
Does anyone know where a Form saves its previous window location and size when it is maximized? When the From is subsequently restored from its maximized state to its "normal" state, it must somehow retrieve these numbers, but how? I like to be able to retrieve this information so I can save it.
Any clues would be appriciated.
|
|
|
|
|
why dont u take the current size of the form before maximizing. u can do the same through wndproc and save it
Els
|
|
|
|
|
I want to store the application window position (including these "pre-maximized settings") ONLY when the application is shutting down so that I can show it the same way the next time the application is started.
But you're right, I could store and update the information every time the window is resized or moved except when it is maximized. I was just wondering if the framework of System.Windows.Form does this somehow for me.
|
|
|
|
|
Hi,
i faced such a problem.
I have a web site (ASP.NET C# built with code-behind approach) with a number (more than 300) web-controls. Now i have to document all of this mass.
Is there any tool that will do following (just for example)
In the very beginning of the file puts:
///...
before every single class:
//<remarks> This is class <c>CLASSNAME and it does blah-blah....
Before each mehtod
///<remarks> This is method <m>MethodName thad does blahblah
//it has params <param />ParamName
Thanks for advice.
|
|
|
|
|
Check out GhostDoc http://www.roland-weigelt.de/ghostdoc/[^] .GhostDoc is a free add-in for Visual Studio that automatically generates XML
documentation comments. Either by using existing documentation inherited
from base classes or implemented interfaces, or by deducing comments from
name and type of e.g. methods, properties or parameters.
DevIntelligence.com - My blog for .Net Developers
|
|
|
|
|
Hi,
Can anyone tell me how can i configure application to Interact with multiple objects using .Net Remoting.
|
|
|
|
|
You need to just do a remote config entry for each object you will be accessing. Then at the client side you will create a single channel and connect to each object as needed using the name you defined in your config.
There are 10 kinds of people in the world.
Those that read binary...
...and those who don't.
|
|
|
|
|
Hi,
do u have any example for related to it
|
|
|
|
|
Hi everybody!!!
I have a TextBox in which user write a float number. Decimal separator is the dot ".".
I have to save the Text of the textbox into a numeric variable... i chosen a double variable.
But when I call Convert.ToDouble(myString) method and myString is, for example 1.5, the number written in the variable is 15. How can I solve this problem?
thank you
|
|
|
|
|
You have to specify the correct CultureInfo or NumberFormatInfo object when you convert the number. Now you are using the default culture, and that obviously uses a comma for decimal separator as it ignores the period.
---
b { font-weight: normal; }
|
|
|
|
|
ok, but with the comma I had the same problem...now I try with the culture info
thankyou
|
|
|
|
|
I found the problem, thanks for your help
Alessio
|
|
|
|
|
Hello all!
I am using a C# program and would like to backup and restore database (SQL Server 2000) from the source code. Can anyone provide some help. I look for msdn but not found.
Thanks All,
Tran Dung
Tran Dung
|
|
|
|
|
We have got the implementation to get excel document from the datatable.
But want to format the cells and rows that datatable in the excel document. How?
Sriharsha R
|
|
|
|
|
Hi Shrihari,
You need to use Cell or Range object in Excel Object Model which you can do by creating automation clients for excel by adding reference of Excel Type liabrary to your project.
Use the Liabrary to Create and modify the ExcelSheets according to your need.
With warm regards,
KEDAR
|
|
|
|