|
-
Flash decompilation
Date: 03/02/08
Keywords: no keywords
Hi all,
Just wondered if anyone may have had a similar need to the following in the past, and had any recommendations.
I need a Flash (SWF) decompiler. More specifically, I need to use it to retrieve all of the resources referenced by the SWF so that I can store them locally. Ideally, I would then like to change all of these references within the SWF to their local copies and recompile the SWF. All of this needs to be done programmatically.
I have cobbled together something very slow and inefficient for Flash version 8 and lower using the open-source FLASM tool, but it involves shelling out to the FLASM executable, and the recompilation takes a long time.
Preferrably, I would like a native .NET component, or a COM component, that could handle these tasks without shelling out to an executable. Even more preferrably, it should support Flash version 9. I do have access to all of the SWF file specs for a number of versions, but I think I would rather purchase/use a third-party or open-source tool than devote a week or two to reinventing the wheel, if at all possible.
Googling "flash decompile" or anything similar yields a completely unwieldy result set which also happens to be useless, since most of the "decompilers" it returns are actually more interested in the conversion of, e.g., a flash animation/movie into FLA by way of decompilation. I have sincere doubts as to whether any of these tools (none of which are development components, which violates one of my requirements already) would be compatible with what I want to do, let alone whether any of them would behave reasonably enough as a commandline application to be able to shell out to it reliably.
Before I write another novel, I'll stop. Please let me know if you have any information or resources which I might find useful.
Thanks
Source: http://community.livejournal.com/csharp/94160.html
-
SSL Challenge + HTTPWebRequest
Date: 02/27/08
Keywords: web
Hi, first of all, sorry for my english. I have HttpWebRequest which connects to https-webservice. I add client certificate from smart card, but I also have to generate answer on SSL Challenge. I know how to get answer, but how can I catch Challenge string from HttpWebRequest connection and then add generated answer back to request?
Thanks, Gleb.
Source: http://community.livejournal.com/csharp/93728.html
-
Shell interop
Date: 02/22/08
Keywords: no keywords
I am trying to open a windows explorer and have it select a file. So for example if my file is c:\temp\a.txt the window would open with the path c:\temp and a.txt would be selected. I can't for the life of me see anything in C# that will allow me to do this. There is a shell call (SHOpenFolderAndSelectItems) which will do it but I know next to nothing about making an interop. If someone can point me to a good refrence on interops or perhaps give me an example of how to call SHOpenFolderAndSelectItems from C# or know of any managed way you would be saving me a lot of frustration.
Thanks!
Source: http://community.livejournal.com/csharp/93618.html
-
Books & magazines
Date: 02/15/08
Keywords: programming
Hey Guys/ new site of books and magazines about programming has appeared. www.dleex.com
Source: http://community.livejournal.com/csharp/93417.html
-
Another Stupid Question
Date: 02/14/08
Keywords: no keywords
I have another quick stupid question.
I thought that setting an object to null in C# will effectively destroy that object and free up the memory it used. However, in practice it doesn't seem to be doing anything.
As I have mentioned before in previous posts, I'm working on an IRC chatterbot. Right now I have three different "brains" that will help the bot talk to people. The first I implemented was AIML. However, I've since told it not to load that one by default because of the massive amounts of RAM it requires (65MB). I've got a toggle that tells it to create the AIML object, which in turn loads all the AIML files necessary, when the user wants to turn on that particular mode. Toggling it a second time should destroy that object, but checking the memory in use it still shows that toggling it off doesn't free anything.
Is there something special I have to do in addition to setting the object to null in order to force the RAM to be freed?
Source: http://community.livejournal.com/csharp/93105.html
-
Работа с графами
Date: 02/14/08
Keywords: no keywords
Есть ли какая-нибудь библиотека или класс .NET, позволяющий загружать в аналитичском виде и обрабатывать граф, в частности вычислять его количественные инварианты (например, количество циклов, объем циклов, диаметр, расстояние между макс. удаленными вершинами и пр.) ?
Is there any DLL or a class in . NET, which provides an opportunity to load a graph analytically and processing them. Especially I'm interested in deriving graph invariants (number of cycles, volume of cycles, diameter etc.) ?
Source: http://community.livejournal.com/csharp/92924.html
-
Taking a C++ native object -> C#
Date: 02/08/08
Keywords: no keywords
Greetings everyone,
Let me just give a little background on my current setup. I'm interfacing to a C++ native DLL though a front-end c# gui. I've got a Managed C++ interop between the two.
My question is this, since I've implemented the managed c++ interop between the two, how can I move a native c++ object to the c# front end? I want to use the object for outputs (whether it be a simple ToString() or what).
Source: http://community.livejournal.com/csharp/92581.html
-
Remote connections that aren't remote.
Date: 02/07/08
Keywords: browser, database, asp, sql, web, google
This is both a SQL Server 2005 and a C# question, so I'm posting it in the community that probably isn't as sick of me asking questions yet...
I've googled this extensively for the past two hours. All of the pages I'm coming up with either (a) have something to do with ASP, (b) have something to do with surface area configuration, and/or (c) have something to do with SQL Express. None of these is the case with my problem.
I'm trying to create a data source in a C# project. When I test connection (or just try to hit OK), I get the following error:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
I am using SQL Server 2005 Standard Edition. Both the SQL Server engine and the database are on my computer, though they are on different drives. I can connect to the database with SQL Server Management Studio (I've been building it all morning in Management Studio). Despite it not being my problem, I have checked Surface Area Configuration, and "Local and remote connections" is checked. I have stopped and started SQL Server Browser, as I have also been advised to do by some pages, with no effect. This is a Windows Application, not a Web Application, and there is no ASP involved.
Anyone have any ideas of what might be causing this problem other than remote connections? Thanks.
Source: http://community.livejournal.com/csharp/92288.html
-
Different proxy settings per WebBrowser control application
Date: 02/01/08
Keywords: browser, web, google
Greetings
I am rearchitecting an existing enterprise application written in .NET 1.1, and one of the requirements is that, on a given machine, several instances of an application that employs the WebBrowser control may be running, but each of them needs to employ separate HTTP proxy settings.
I know that the WinAPI call to InternetSetOption() can be used to set proxy settings on a system-wide basis, but I was wondering if any of you knew a way to set proxy settings for a WebBrowser control on a per-application basis.
This particular application predates my employment, so while I have had to wade through its incredibly poorly-designed and messy code a few times in the past, I am not eager to do so again. I do know that the previous application managed the above functionality, though, so I know it's possible.
Any help or information is appreciated; I have Googled the subject often and the only response I've found so far (which I know to be false) is that it simply cannot be done.
Thanks for any help.
Source: http://community.livejournal.com/csharp/91915.html
-
Detecting a window-close on a mobile device
Date: 01/29/08
Keywords: no keywords
I'm writing a simple application for a Windows Mobile 6 device, in C#. I need to completely exit the application when the user clicks the X in the upper-right corner (by default, the application is left running in memory, but the form is hidden). Unfortunately, I can't figure out how on earth to detect this event.
On non-mobile platforms, this is detectable with a Closed or Closing event. On this device, though, the Event Handlers for those events are never called.
Also, the Visible and Enabled properties are still both true and the WindowState is Normal, even after the window disappears, so I can't figure out how to even catch the state through polling.
The only thing I've been able to figure out is that if I set MinimizeBox = true, then the X becomes an OK, and clicking the OK generates a Closed event. However, Giving the main application of a dialog box is just poor style and misleading to the users.
Can someone please tell me how I can accomplish this?
Source: http://community.livejournal.com/csharp/91798.html
-
Google search via C#
Date: 01/25/08
Keywords: html, web, google
I'm working on an IRC bot in C# and I want to be able to have a command that will take a query, search Google with it, then display the first few results in the order of PAGE TITLE, URL, SHORT DESCRIPTION. Right now the best I've been able to do is download the first page of results which really doesn't help me any.
try
{
using (WebClient wc = new WebClient())
{
wc.Proxy = null;
wc.QueryString.Add("q", query);
wc.DownloadFile("http://www.google.com/search", "results.html");
}
}
catch (Exception e)
{
System.Console.WriteLine("Error: " + e.ToString());
}
Is what I need to do even possible? If it is, all I really need help with is to get the three components of the results (maybe for the first two just to start) to be passed back to the method that calls this one.
Any help is severely appreciated.
Source: http://community.livejournal.com/csharp/91506.html
-
Select rows in a DatGridView
Date: 01/24/08
Keywords: database
Maybe I'm just blind, but...
I have a DataGridView on a form with MultiSelect = false and SelectionMode = DataGridViewSelectionMode.FullRowSelect displaying data from a table in a database. My idea is, that a row is automatically selected, if a user enters the key value in a dialog. Not filtering, just selecting. The Rows property provides a collection, and I can set the Selected property of the current DataGridViewRow element to true. But the only way I see to find the correct row is to iterate over all items, until I find the requested row.
Does someone have an idea for a simpler way?
Source: http://community.livejournal.com/csharp/91207.html
-
WCF and OO help -- part 2
Date: 01/05/08
Keywords: xml, web, microsoft, google
All,
Hi again. I posted the message two down from this one (unless someone posts while I'm typing this) about the frustrations of .NET WebServices and an OO structure with logical boundaries. I received a bunch of hearty recommendations for WCF, all ensuring me that it would provide all of the great stuff I love from .NET Remoting, but it would let me do it over HTTP(S).
I guess I should have been more specific.
I attempted a WCF implementation of a few of the methods in one of my services. While it certainly behaved better than a WebService implementation (e.g. passing/returning an Interface didn't crash it! *sigh*), I'm still not getting the behavior I want. So I'm going to be a little more specific.
My application's architecture necessitates a large number of application modules, most of which are communicating with most of each other, while what each of them has to say to any given module is fairly narrow in breadth (say, 1-3 possible remote transactions per module pair in the network -- that is, if there were three modules (and there are actually more than double that), let's call them A, B, and C, module A would host 1-3 types of requests from B and C; module B would host 1-3 types of requests from A and C; module C would host 1-3 types of requests from A and B. You get the picture.
Because of this property of my application's communication schema, I was (perhaps stupidly -- I am certainly willing to eschew this particular practice, but read on for what I want to still be able to do) using two generic structs to do the gruntwork for all communication methods: TCPResponse CallRemotingService(TCPAction thisAction)
Where TCPAction is simply: public string Command; public string ComputerName; public object Data; public Type DataType;
and TCPResponse is simply: public bool Success; public string ErrorMessage; public Exception ErrorException; public object Data; public Type DataType;
By switching on TCPAction.Command and verifying TCPAction.DataType, I could cast TCPAction.Data into what I expected (TCPAction.DataType) and execute some private method on it that would return a TCPREsponse which I would return to the caller.
WCF complained that it didn't know anything about the classes (which contained other interfaces or still other classes as members) I was shoving into TCPACtion/Response.Data.
I understand that this approach has a number of unreasonable properties, so after seeing that it did not work with my attempt at WCF (which I suppose is my first question -- could it?), I moved on to the following.
As long as I can use the business objects I created for the purpose of shoving into TCPAction/Response.Data as parameters/returns for operation-specific methods of the WCF service, I am still happy, so I tried setting up a WCF service with a single method to see if my business objects would work in a more explicit form:
public string TestWCF(WSDataObject thisData) { }
Now, WSDataObject is a custom business class that has the following members (with appropriate get/set properties):
private ITransactionObject myITransactionObject; private WSAuthenticationObject myWSAuthenticationObject;
While ITransactionObject contains native framework value types, WSAuthenticationObject goes even further with:
private IWSPreAuthentication myIWSPreAuthentication; private string myServerAuthenticationKey;
Again, all of these classes have get/set properties for all of their members, which I've listed -- property names simply chop off "my."
The problem with this implementation was that WCF didn't know anything about some subset of the classes/interfaces "underneath" WSDataObject (ITransactionObject, WSAuthenticationObject, IWSPreAuthentication). The result was some kind of custom exception relating to type conversion.
FYI, I was using the Microsoft WCF "Getting Started" tutorial (modifying it to my needs) at this link.
I have to say I was disappointed that, just like WebServices, WCF requires a proxy class to mangle the public-facing portion of the object. However, I was too disheartened (and found far too little information from Google about "nested" classes like this) to "get my hands dirty" and see if I couldn't use the KnownTypeAttribute, or some other magic entirely, to make my business classes behave. Also, I was disappointed that WCF didn't (or I didn't make it) pass an entire object, private members and all. Is it possible to pass even methods?
That said, it looked like I was going to be pigeonholed into (some of) the same activities that WebServices would have forced me into -- basically writing a kind of serialization/deserialization layer in which I transmit and return only .NET native value types across the wire, but to and from which my applications can pass my real business objects. Which seems like a lot of unnecessary work.
I'm sure I didn't learn 10% about WCF in MS' tutorial -- does anyone have any better WCF resources that might be able to help with my problem? And/or has had experience with this particular problem in the past?
Any information/help is appreciated, as always. .NET Remoting works so well, but I just don't think it will fly in an application being marketed to customers, one component of which must be running from within their firewall. I wish there was some way to use .NET Remoting to make a request, grab the bytes, serialize them with XML, pass them to a really generic WebService with WCF, deserialize them, execute the transaction, and perform the reverse.
Source: http://community.livejournal.com/csharp/90948.html
-
GUI multithreading woes Pt. 2
Date: 01/03/08
Keywords: no keywords
Alright experts...I need your help again. Thanks again for the help before.
I have a listbox on the main form called outputList. In the main form's code I have the following:
public delegate void AddTextDelegate(string text);
public void AddText(string text)
{
if (outputList.InvokeRequired) {
AddTextDelegate del = new AddTextDelegate(AddText);
Invoke(del, new object[] { text });
} else {
outputList.Items.Add("[" + DateTime.Now + "] " + text);
}
}
What I've been doing is passing a reference of the main form to the worker thread(s). It feels dirty and I don't like it, even though it works. NOTE: the worker thread is in a separate .CS file but the same namespace. I was thinking that I could just pass the delegate method above so the worker thread could write to the listbox through that. The problem is I don't know how to create a method in the thread class to invoke it. If I pass a reference and declare the delegate signature it works in the thread's constructor, but I don't know how to keep it beyond that (if you need clarification on that last sentence I can provide code).
Any ideas?
Thanks.
Source: http://community.livejournal.com/csharp/90788.html
-
.NET Remoting on port 80 -- reasonable?
Date: 12/29/07
Keywords: software, xml, database, asp, web, linux, hosting, microsoft
All,
As those of us who have worked with attempting to make any logically partitioned/layered OO schema work between .NET client applications and WebServices know, it's simply not possible without going far out of your way to do a lot of extra work that the elegant OO inheritance/extension was supposed to alleviate anyway. When I am especially irked about this issue, I will construct job interviews with the following two questions spaced one after the other:
n) Do you consider yourself a fully object-oriented developer, familliar with the concepts of inheritance, extension, abstract classes, interfaces, with the ability to both understand and work with the boundaries/"layers"/"tiers" between classes for a given software project (e.g. Database/Business Objects/User Interface)?
m) If so, what do you consider the most effective way to transmit an instance or instances of a business object from one .NET application to another (either client -> server or server -> client)?
The answers are invariably n) Absolutely, yes, I am God's gift to rational software development; and m) [whirr-clunk as Microsoft gears engage within brain] Using disconnected System.Data.DataSets since they're already XmlSerializable!
Always gives me a laugh. Nevermind that employing such an approach basically necessitates the creation of a FOURTH boundary/"layer"/"tier" -- call it Middleware, or specifically in this hideous world, Serialization/Deserialization.
Anyway, on to my question!
Due to the headaches raised by the above subject, and the deeper object replication that goes on using .NET Remoting (e.g. regardless of what is actually transmitted down the wire, you get a complete, functional, fully type-specific object with its public/private members/properties/methods intact, with NO Reference.cs or any other whiz-bang class-redefinition machinery thrown in your face), I come upon a quandary.
In my mind, at least up til the present moment, .NET Remoting is great for applications over whose general operational control you or your company or your trusted partner will maintain for the lifecycle of said application. With this kind of organizational scenario, routers and firewalls are generally surmountable, or at least negotiable, obstacles, since you know exactly from which machine(s) or subnet(s) certain TCP packets will be sent, and exactly to which machine(s) or subnet(s) those packets will be transmitted, and on what TCP port(s).
.NET WebServices, on the other hand, are a better choice for software with an eventual goal of wider distribution to CUSTOMERS rather than colleagues or partners -- entities whose firewalls you do not control, and who will regard something as little as a request as to its status wrt your application's performance as reflecting an incredibly unprofessional design. In other words, it's not much of a limit to place on your customers that they can transmit HTTP over port 80, and/or HTTPS over port 443.
But, as I finish up the previous 4 hours of banging my head into various WebService-related walls attempting to get class instances (or even just their public data -- I know how WebServices work and I understand it's for good reason) to replicate, I have to wonder -- what kinds of problems might there be lurking in, say, a widespread commercial application, some of whose clients employ .NET Remoting to communicate with their remote servers using TCP port 80? I don't see any particular *TECHNICAL* problems that are unsurmountable -- obviously, as usage scales, there will be more of a hassle doing load-balancing types of activities compared to, say, turning on IIS clustering and walking away. But that's a problem that is entirely out-of-scope for me -- if I get there with the subject of this question, and it's my biggest problem, I will be very happy.
Anyone consider or try this in a relatively large/Enterprise-level "ASP" (in its original disambiguation, that is, an Application Service Provider hosting the requests of potentially hundreds or thousands or more clients) environment? I pulled the better part of a decade as a systems/network admin and general TCP/IP geek (UNIX/Linux), so I know that, at least as of ~2003, you couldn't tell your router (unless it had more processors than most mainstream servers in 2007) to ONLY allow traffic fitting the profile of HTTP requests out on port 80. So I don't really see any technical problems.
However, any feedback is welcome. Thanks for reading this -- my fingers tend to run away from me. :)
Source: http://community.livejournal.com/csharp/90393.html
-
Quick ListBox question
Date: 12/27/07
Keywords: no keywords
I have a non-selectable listbox that displays info for an operation. What's the best way to have it keep up on the most current text addition (as opposed to it staying on the first item) as it adds text in a loop?
Source: http://community.livejournal.com/csharp/90324.html
-
Maximum size of List
Date: 12/21/07
Keywords: programming
What is the maximum number of elements that we can specify in List constructor?
(xpost csharp, csharp_ru , ru_programming)
Source: http://community.livejournal.com/csharp/89943.html
-
Compact Framework Background service
Date: 12/17/07
Keywords: no keywords
I am quite familiar with writing .Net2.0 CF apps, yet I cannot seem to find even a simple example of a 'service' job for the compact framework.
Is it possible to create and run background tasks for the .Net2.0 CF?
Source: http://community.livejournal.com/csharp/89774.html
-
GUI Multithreading Woes
Date: 12/13/07
Keywords: no keywords
I'm new at this topic so please be nice. :) I need your help. I have two code files; one contains a standard derived windows form and the other file contains a class that "does stuff". The first class (the main form) contains a listbox that I want the second class to be able to access. Without using any multithreading the only way I can access this listbox in the second class is to pass a reference to the constructor of the second class, regardless of the access modifier of the listbox. For some reason this doesn't feel right. Please clarify this first. Next consider the main form creating an instance of the second class in a separate thread. This would involve delegates (I believe) to be able to update the main form's listbox safely from the second class. Is the delegate defined in the second class or the form class? Here's some pseudocode:
(form class, file 1) form has a listbox create object of class 2 in its own thread run thread until finished
(class 2, file 2) do stuff write status info back to the listbox in the first class as the object processes
How do I go about doing this? DOES the listbox reference need to be passed to the second class? I'd like to keep the two classes in separate files if possible.
Thanks in advance.
Source: http://community.livejournal.com/csharp/89458.html
-
Содержимое папки, C#.NET
Date: 11/28/07
Keywords: no keywords
Как извлечь в массив все файлы текущей папки вместе с файлами всех ее подкаталогов, и в свою очередь, их подкаталогов и т.д. Чувствую, что боян, но ничего нигде найти не могу :(
Source: http://community.livejournal.com/csharp/89119.html
|