|
Take a look to this article
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=312
|
|
|
|
|
Thanks a lot.
|
|
|
|
|
Hi,
I know that if you make your applicaton using the Ms Excel 9.0 and automation it will work fine for 2000 and XP versions.
But If I make it using the references to XP, no way to use it in 200O ? isn´t it ?
|
|
|
|
|
No, I don't think so.
You would at the very least have to change the references to point at the mso9.dll etc... and it __might__ still work so long as you're not accesing features in code that don't exist.
|
|
|
|
|
I have a byte[] that contains what in C++ would be this struct:
struct<br />
{<br />
unsigned type : 5;<br />
unsigned level : 2;<br />
unsigned bouncing : 1;<br />
unsigned emp : 1;<br />
unsigned isBomb : 1;<br />
unsigned shrapCount : 5;<br />
unsigned fireType : 1;<br />
};
Is there a way to make the byte[] into a class in C# without doing each member seperately with bitwise AND & shifting?
|
|
|
|
|
You might find the BitVector32 class useful to base your code off of.
You would create references to your types with the following code:
BitVector32 bv = new BitVector32(0);<br />
BitVector32.Section type = BitVector32.CreateSection(31);<br />
BitVector32.Section level = BitVector32.CreateSection(3,type);<br />
BitVector32.Section bouncing = BitVector32.CreateSection(1, level);<br />
BitVector32.Section emp = BitVector32.CreateSection(1, bouncing);<br />
BitVector32.Section isBomb = BitVector32.CreateSection(1, emp);<br />
BitVector32.Section shrapCount = BitVector32.CreateSection(31, isBomb);<br />
BitVector32.Section fireType = BitVector32.CreateSection(1, shrapCount);
The values are accessed as follows:
bv[type] = typeValue;<br />
bv[bouncing] = 1;
Access to your values with no &, |, or <<
|
|
|
|
|
|
for my current c# project i need a ftp connection test.
Given: Username, Password, port, hostname or ip
i tried it with System.Net.Sockets.Socket but it seems to be to slow to test more than 10 ftps in a row, cause of connection delay. the returnvalue just have to be boolean for Online/Offline
Somebody know a fast method to test this?
thanks / regrards
Martin Lierschof
Junior Programming Assistant
World-Direct.at eBussines Solutions GmbH
mail²: martin.lierschof@world-direct.at
|
|
|
|
|
I have an IIS-managed server object, exposed to clients using a service/wellknown web.config entry. But I don't want clients to have to know the type of the object (currently defined in a shared library) -- rather I want them to just query for the interfaces they require. This would theoretically allow me to change the underlying type on the server without code changes on the client.
To achieve this I wanted to expose the type as System.Object, but does not seem to be allowed by the remoting system. Have I made a design mistake? If so, what should I be doing?
Jade Burton
Programmer
|
|
|
|
|
You'll have to expose the object as atleast its interface.
<br />
public IMyInterface GetIt()<br />
{<br />
return (IMyInterface)myObj;<br />
}
where myObj is an object of any class that implements the IMyInterface interface
|
|
|
|
|
You might be able to use internal on all other classes except your facades/interfaces. That should 'hide' those classes from all outside calls.
|
|
|
|
|
If i create an array that is a specific size
int[] myInts = new int[10] but only fill the first 5 values, how can i reduce the length of the array to 5? so the following will happen
myInts[0] = 5;
myInts[1] = 4;
myInts[2] = 3;
myInts[3] = 2;
myInts[4] = 1;
for (int i = 0; i < myInts.Length; i++)
{
Console.WriteLine(myInts[i].ToString());
} and the output would only be 5, 4, 3, 2, 1 and not throw an exception since myInts[5] is null
|
|
|
|
|
hi,
if the size of the array is unknown before it is used then you must check each member of the array for null value.
Change tour for loop to this
for( int i = 0; i < nyInts.Length, myInts[i] != null; i ++ )
as i know there is no any function to resize of an array.
cheers,
Doing something is better than doing nothing. So ... Move !
|
|
|
|
|
If you need to resize an array, you should go throug the ArrayList, even though it isn't typed.
If you need a typed array, but don't know the size of it you can use ArrayList in this way:
<br />
ArrayList al = new ArrayList();<br />
<br />
al.add(5);<br />
al.add(4);<br />
al.add(3);<br />
al.add(2);<br />
al.add(1);<br />
<br />
int[] myInts = (int[])al.ToArray(typeof(int));<br />
If you need to change the size of the array, you can start with ArrayList al = new ArrayList(myInts); instead.
This will add some overhead (going back and forth between arrays and arraylists), but it gives you the type safety you need.
|
|
|
|
|
I want to make a trial version of my program, I want it to expire after 30 days, and if you want more you buy a serial number. (In other words; the usual.)
I know this is a very common thing but I've never done it before, can anyone point me to some tutorials or something about how to do this? I'm thinking I can make a win32 C++ dll and interop with it to avoid being easily decompiled, but I don't know how to get started with the s/n and expiration stuff.
Thanks
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Bog wrote:
I want to make a trial version of my program, I want it to expire after 30 days, and if you want more you buy a serial number. (In other words; the usual.)
I know this is a very common thing but I've never done it before, can anyone point me to some tutorials or something about how to do this? I'm thinking I can make a win32 C++ dll and interop with it to avoid being easily decompiled, but I don't know how to get started with the s/n and expiration stuff.
Sorry for not giving a solution to you: I think you won't have an easy solution. Protection schemes that use a separate DLL are simply not safe. What one normally needs to do is to create a dummy DLL and provide the application with it. Anyone capable of decompiling an app should be capable of creating such a DLL.
I too am looking for a good protection scheme for .NET but I was not able to find such a thing yet, even with hard locks involved.
My latest article: GBVB - Converting VB.NET code to C#
|
|
|
|
|
A possible solution: encrypt the serial number with an asymmetric algorithm.
Even after decompilation, people will find the public key needed to decrypt the serial number but they will not find the private key needed to crypt it.
|
|
|
|
|
I've had this issue before.
Unless you want to pay out loads of cash for a protection package which will almost certainly get cracked you should just put some simple time expiry code in. Maybe add a time stamp to an innocent file somewhere or something.
The thing is in my experience, if you produce a nice little app and distribute it as a trial then get people to buy. Most people will- if it is a good application- pay the few quid to get the full version. The issue really is that if it is an app that is __so__ good that it becomes __very__ popular, it doesn't matter what scheme people use to protect it, it WILL be cracked and on Kazaa within 24 hours. (as with Windows XP, Office XP, PhotoShop, InDesign etc etc etc all cracked and shared despite the investment in copy protection and license enforcement!)
You can't win.
The only 98% way of securing the software is to use something like hardware dongling... but that's a different set of deployment scenarios.
|
|
|
|
|
|
I agree. Don't waste too much time in developing some "secure" serial number/trial version scheme. Better to spend that time making your application better. If companies like Microsoft, Adobe and Macromedia can't stop cracking/hacking, what chance do we have? If your software is any good it WILL be cracked one way or another.
-----------------------------
Try my Batch Image Processing Software Read my DirectX 8 Tutorials
|
|
|
|
|
The best protection I have seen was for Virtual TurnTables. If you tried to debug the exe, it would simply shutdown your system. But even that wont stop the crackers.
<a TITLE="See my user info" href=http:
|
|
|
|
|
when I added a report to my project, then packaged it.
On the client computer, I installed .NET Framework, then installed MDac2.7, finally installed my project, but when view the report, it's go to error!
maybe it's the license problem.
how can I solve this?
|
|
|
|
|
Crystal Report framework is different from .net framework and MDac. Go and see the CD that you used to installed .NET framework.(I guess its CD No.5 of Visual Studio.NET). You will see a separate directory that included Crystal Report Framework.
Mazy
No sig. available now.
|
|
|
|
|
hi,
thanks for your reply.
But I dinnot find any folder of your mean. Just thought when used Crystal Reports in our project, the setup project will detect the component of Crystal Reports and include it while you setup.
Would you show me the Crystal Report Framework folder or something like a file to setup CR Framework.
thanks again.
|
|
|
|
|
hi friends,
I am currently interested in writing a packet capture program like etheral. I finished the base api part. I used packet.dll source code of winpcap and ported all the function to c#. In other way , my api class doesn't use wpcap.dll and packetx.dll. i only use npf.sys ndis kernel driver. And then i downloaded etheral source code and added the ability of supporting over 15 protocols which are LLC , NETBIOS , IPX , STP , CDP , TCP , UDP , ICMP , HTTP , NBSS , NBDS , NBNS , ARP , EIGRP , DNS ( Not finished yet ) , LOOPBACK , SMB ( Not finished yet ) and SMB Mail SLot ( Not finished yet ).
Because it is very difficult to add so many protocols to my project and because it takes so much time, i need friends to help the project finished and to correct my bugs in the code and to recommend better methods that can be used in the code.
thanks for now,
sincerely yours,
Fırat Koçak
Doing something is better than doing nothing. So ... Move !
|
|
|
|