|
i can not use domain name system
i want to do it in workgroup enviornment
????
|
|
|
|
|
That's the only method you have. The "domain" would be the name of the target workstation since the admin account your use must be on that workstation. That's IF the workstation is not part of a domain.
|
|
|
|
|
I had created a setup for my project in c# using visual studio. Then I installed it. After that when i try to open any software in my pc, it shows the shortcut is missing. Then when i click add/remove programs in the control panel it opens my project. Please tell me what kind of problem is this? And how to resolve this problem?
|
|
|
|
|
I made my project in Visual Studio 2005 using C# language , SQL SERVER 2005 in Backend and Ado.net connectivity. Now I want o make .exe file (Windows setup file)
But I dont know how to do it, So guys help me ....
Thanks in advance....
|
|
|
|
|
You mean you want to make an MSI package? (by compiling your project you will get an .exe file if that is your projects output type)
Add a Setup Project to your solution in VS (File >> New >> Project >> Other Project Types >> Setup And Deployment >> Setup Project).
|
|
|
|
|
|
how do i get the duration of a video?
123456
|
|
|
|
|
In what context ? The windows media player control will tell you. What have you tried ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thank you verry much
123456
|
|
|
|
|
Hello,
First of all , i would like to thank the whole commmunity for sharing so much knowledge and i can say that i learned programming from here.
I'm a developper with a middle level working essentially in gestion programming with databases and sites.
I'm really interested in developping now a new type of program for my Windows Mobile Device, a "secured" voip application.
So first of all i gathered all the ressources about the subject , but i still block on the complexity of the workflow and don't know where to start from.
To expose it clearly here are all i found on voip & securing the media stream :
> PJSIP - Open Source SIP Stack
>Sipek Wrapper of Pjsip for Windows Mobile(Not updated anymore)
>The libZRTP library used by Zphone to encrypt media stream
My problem here is that all these libraries are first not compiled in .dll and i could not use them easily, and second there were written either in C or C++, and i'm not expert in converting all of them to dynamic dll. Of course i'm willing to develop in C# since i do not really care of performance issue, if i could make a simple call with a maximum of 2 participants (i'm aiming eventually at 4) in conference i will already considered it as a success.
If anyone could point me to the right direction or want to be part of my aventure, he'll be welcome !
You can contact me by mail or by PM on this site.
Thank you for reading me.
|
|
|
|
|
You can use p/invoke to call a C++ dll. www.pinvoke.com is a good place to start.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Your class must be inherit from MarshallByRef
|
|
|
|
|
How do you query a odbc connection for it's list of tables?
|
|
|
|
|
You don't query the connection, you query the database it is connected to, and that depends on the database. In SQL Server; SELECT * FROM sys.Tables
only two letters away from being an asset
|
|
|
|
|
Have a c app that may be converted to c#, but I am having a problem with this:
From OTHER apps written in C++, a buffer is written to the socket (which will be read by the future C# app) from variables based on several different TYPEDEFs, for example:
typedef SAMPLE1
{
int32 msg_id;
char status[15];
float value;
};
...
...
SAMPLE1* samp;
samp->msg_id = 100;
strcpy(samp->status, "NOTYPEDEF?");
samp->value = 120.123f;
send(samp, sizeof(SAMPLE1));
...
...
In the soon-to-be-replace C app, I just read the socket buffer and based on the msg_id, cast it to the appropriate TYPEDEF, functionaliy which for some silly reason Billy G. decided C# did not need.
Does anyone know of a way for C# to parse thru the socket data, where the sending apps cannot be modified to change how the data is sent?
Unless I'm missing something, serialization does not seem to be an option because the data read will not hold any object data.
|
|
|
|
|
Hi,
I have some pointers for you:
1.
this is not a typedef, it is a struct.
C# knows about structs.
2.
in .NET an array is a managed object, hence the struct would contain an int, a reference to some Unicode characters, and a float. Not what the other side is thinking of.
3.
if the string really is 15 8-bit characters, I suggest you use a byte array, not a char array. That solves the width problem. It also needs a conversion, as offered by Encoding.GetBytes and Encoding.GetString; you need the proper encoding for this to handle your top half of the charset correctly; in the Western world Encoding(1252) is the prime candidate.
4.
now you must make sure the array content, not its reference, sit inside the struct.
that takes [StructLayout(LayoutKind.Sequential)] before the struct
and [MarshalAs(UnmanagedType.ByValArray, SizeConst=15)] before the byte[]
5.
then there is the issue of padding, here the question is: does or doesn't the C++ side insert a dummy byte to get the float "naturally aligned". I don't know, it depends on compiler defaults and possible presence of explicit pragma's. Easiest would be to look at the data, and/or try both. A simple way to force padding is by inserting a byte as in byte dummy; ; there isn't a simple way to avoid padding. I tend to use
[FieldOffset(x)] in front of every struct member, where x is the byte offset you have to calculate correctly.
So, this should get you started (for a long while maybe).
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
modified on Thursday, October 15, 2009 4:56 PM
|
|
|
|
|
I am reading this excel file and searching for the word "Yellow" Everything is fine until I reach a type double. How do I handle this. My code is below.
Excel.Application xlApp ;
Excel.Workbook xlWorkBook ;
Excel.Worksheet xlWorkSheet ;
Excel.Range range ;
string str;
int rCnt = 0;
int cCnt = 0;
xlApp = new Excel.ApplicationClass();
xlWorkBook = xlApp.Workbooks.Opentest", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(8); // Opens the 8th tab in workbook
range = xlWorkSheet.UsedRange;
for (rCnt = 1; rCnt <= range.Rows.Count; rCnt++)
{
for (cCnt = 1; cCnt <= range.Columns.Count; cCnt++)
{
System.Convert.ToString(xlWorkBook);
str = (string)(range.Cells[rCnt, cCnt] as Excel.Range).Value2 ;
if (str == "Yellow" )
MessageBox.Show(str);
}
}
xlWorkBook.Close(true, null, null);
xlApp.Quit();
releaseObject(xlWorkSheet);
releaseObject(xlWorkBook);
releaseObject(xlApp);
}
private void releaseObject(object obj)
{
try
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
obj = null;
}
catch (Exception ex)
{
obj = null;
MessageBox.Show("Unable to release the Object " + ex.ToString());
}
In other words how can I convert his whole spreadsheet to type string. I am new to this thanks.
|
|
|
|
|
Hi,
I've never done Excel programming, however I expect the problem is in str = (string)(range.Cells[rCnt, cCnt] as Excel.Range).Value2 ; as this statement assumes Value2 can be cast to string.
BTW: You should have provided a try-catch, look at the line number in the exception output, and use your IDE to look at the offending line.
Here are three ideas (in decreasing preference):
1.
str = (range.Cells[rCnt, cCnt] as Excel.Range).Value2 as string;
this results in str being the cell content if it was a string, and null otherwise.
2.
str =(range.Cells[rCnt, cCnt] as Excel.Range).Value2.ToString() ;
however this would fail if Value2 were null
3.
you could add a try-catch inside the inner loop, and skip the failing cells
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hi all,
Weird problem: When I set focus to a scrolled control, it resets the scroll position to (0, 0).
This happens with three different methods for setting focus: Focus (), Select (), and setting the parent's ActiveControl.
Resetting the correct scroll position after setting focus doesn't work: The scrollbars disappear!
MSDN doesn't even mention this phenomenon. A solution is proposed here http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/437437c8-9548-4e68-8f17-356f848f379d[^] but has no effect for me.
Any suggestions how I can set focus to a control without screwing up the scroll position? Thanks!
|
|
|
|
|
I presume this control has items such as ListViewItem. I hope you do not force it to refresh any items in it
|
|
|
|
|
That solution works for me, I really appreciate you post that link.
Diffy
|
|
|
|
|
I have an app that needs to read in excel files. However the users keep leaving them open, so I want to
save changes and close them. I have no read experience in WinAPI in C#. Could someone help?
Thanks
Everything makes sense in someone's mind
|
|
|
|
|
simply kill the Excel process, or shutdown the system, or disconnect the power cord, each time this happens, and until the users have learned it doesn't make any sense to enter data and not save it.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Well, golly gee, you DO have good ideas.
Everything makes sense in someone's mind
|
|
|
|