Hi Deepak, Thanks for the reply. What I'm really hoping for is some specific product recommendations, preferably backed by some past experience using the product. Cheers, Pete
moredip
Posts
-
Software protection - any suggestions? -
Software protection - any suggestions?Hi David, I think what I was trying to say is that I don't want a solution that relies totally on security through obscurity. I agree with your response, but I'm also sure we could go back and forth for eternity suggesting holes and solutions to those holes. I have to work under the assumption that any solution I handcrafted would be VERY inferior to one I buy in from a company who essentially get paid to be good at this stuff. An analogy would be when I needed some image processing functionality. First off I wrote my own stuff, then realized that for the development costs of my crappy, slow thresholding algorithm I could buy in a third party imaging library that did a MUCH better job. Cheers, Pete -- modified at 14:49 Monday 13th March, 2006
-
Software protection - any suggestions?Hi David, Thanks for the reference. All due respect to Nish, but I don't think this implementation is strong enough to satisfy our requirements Firstly, as I understand the implementation, all that is required to beat the protection is to delete a file in the system directory and a registry key (both of which share a similar name). Secondly, it would presumably be fairly trivial for a cracker to modify the executable by inserting an implementation of CExpire::HasExpired() that always returns false. I think maybe I should have mentioned in my original post that we need something that is reasonably crack-proof :-O Cheers, Pete
-
Software protection - any suggestions?Hi Sreekanth, Thanks for the response, and thanks for the classification of protection schemes that you came up with - it seems to mesh well with the impression I have of the available schemes. It also seems to me that there is probably an inverse relationship between the security offered by a scheme and its convenience, both to us as developers and to the end user. We currently implement a "Weak" protection scheme (well, maybe "Pathetically Weak" would be more accurate). I'm sure if I asked my boss he would say we NEED a Rugged scheme. Personally, I think Strong is adequate. Guess who gets the final word... I think Rugged is probably the way to go. Would you or anyone else have a shortlist of candidate products? Cheers, Pete
-
Software protection - any suggestions?Hi All, My company is planning to create an evaluation version of our product for marketing purposes. Obviously we don't want potential customers to just keep using the evalution version, so we'd like to limit it in some way - it only works for 2 weeks, or 15 application starts, or whatever. Does anyone have any suggestions for a third-party Software Protection suite? We are NOT interested in developing something in-house - frankly I don't think we have the required security skills/knowledge. We DO need a software-only solution. If anyone can give me feedback on products they've had personal experience with I'd be really grateful. Obviously I've googled "software protection", but some impartial recommendations would really help narrow down the (seemingly extensive) options. Cheers, Pete
-
controlling window size during CascadeHi all, I'm trying to figure out how to control the size of a CView-derived window during a cascade operation (i.e. when the Cascade menu item in the View menu of a MFC-based MDI app is selected). I've looked into having my CView override various message handlers( WM_WINDOWPOSCHANGING, WM_GETMINMAXINFO, WM_NCCALCSIZE, and WM_WINDOWPOSCHANGED), but none of those messages seem to contain enough information for my CView to know whether it is being cascaded, or just resized in another way( maximized, restored, resized by the user, etc.). Do I need to look into overriding the way an MFC app handles the Cascade command, and if so where would I start on that? Any advice or suggestions greatly appreciated. Cheers, Pete
-
Newbie GROUP BY questionHi again Colin, I modified the SQL you provided slightly from this: Colin Angus Mackay wrote:
SELECT main.ActivityID, main.PercentComplete, main.WhenComplete
FROM Activity_Session_Summary AS main
INNER JOIN (SELECT ActivityID, MAX(WhenCompleted) AS WhenComplete
FROM Activity_Session_Summary
WHERE StudentID = %s AND ActivityID IN ( %s )
GROUP BY ActivityID) AS sub
ON main.ActivityID = sub.ActivityID AND main.WhenComplete = sub.WhenComplete
WHERE StudentID = '%s' AND ActivityID IN ( %s )to this:
SELECT main.ActivityID, main.PercentCorrect
FROM Activity_Session_Summary AS main
INNER JOIN (SELECT ActivityID, MAX(WhenCompleted) AS WhenCompleted
FROM Activity_Session_Summary
WHERE StudentID = '%s' AND ActivityID IN ( %s )
GROUP BY ActivityID) AS sub
ON main.ActivityID = sub.ActivityID AND main.WhenCompleted = sub.WhenCompleted
WHERE main.StudentID = '%s'I just wanted to confirm with you that removing the final
AND ActivityID IN ( %s )
makes sense. It seems to me that it's redundant, since themain.ActivityID = sub.ActivityID
join will ensure that only ActivityID's in the supplied( %s )
list will be considered. Is that correct? Cheers, Pete -
Newbie GROUP BY questionHi Colin, Wow! Thanks for such a rapid and comprehensive reply, I really appreciate it. I also appreciate your warning re: injection attacks. However, this project is for internal use with hardcoded input values, and will not be accessible in any way outside the machine it's run on. Famous last words? Well, if our security is so screwed that someone can access the script and modify the SQL statement then I can think of many easier ways for them to accomplish their evil ends. But I appreciate your concern! I think I understand the SQL you gave. I was hoping that there was a way to do this without subqueries (they make my head hurt a little at times), but suspected that they would be necessary. I think that the StudentID /is/ necessary in the main query. It's theoretically possible that two rows in the result set don't differ in ActivityID or WhenCompleted, but only by StudentID. Not likely, as it would involve two students completing the same activity within a second of each other (or whatever the resolution of DateTime is in SQL Server), but possible none the less. Again, thanks a lot Colin, you've really helped me out here, and hopefully helped me learn a little so I don't ask the same question in a different form in 2 months time! Cheers, Pete
-
Newbie GROUP BY questionHi, I'm currently working on some SQL stuff as part of a project I've been assigned to, and I have a newbie question regarding the GROUP BY clause in a SELECT statement. I have a table, Activity_Session_Summary, that contains information about the results of the online quizzes that our product administers. Each tuple represents a summary of a user's results for a specific attempt at a specific quiz. Its columns include 'ActivityID', 'PercentCorrect' and 'WhenCompleted'. What I need is a SELECT statement that returns the PercentCorrect value for the most receently completed quiz attempt, for each activity. So far I have
SELECT ActivityID, MAX(WhenCompleted) FROM Activity_Session_Summary
WHERE StudentID = '%s' AND ActivityID IN ( %s )
GROUP BY ActivityIDwhere the
%s
's are format placeholders. This statement almost does what I need, but obviously doesn't give me the PercentCorrect. However I can't just add PercentCorrect to the SELECT's column list, because SQL Server politely tells me"'PercentCorrect' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.'
Can anyone point out what I need to do to get this to work as required? -
Path to user's desktop folderThat'd do it! Thanks David :)
-
Path to user's desktop folderHi All, Ok, this should be easy to figure out, but I can't seem to google a good answer. I need a way to programmatically discover the path to the current user's desktop. Something similar to GetWindowsDirectory() or GetSystemDirectory(), I guess. The only think I could find was VBScript stuff like WshShell.SpecialFolders(...) or using the Windows Shell COM stuff. There must be a simpler way to do this in C++, no? TIA, Pete
-
muliple-inheriting two functions with identical signaturesHi Ryan, Unfortunately I don't have GCC - or anything other than VC++ - available for testing. My reading of the page that PJ gave is that the base classes have to be declared as
interface
or__interface
, which is an MS-specific extension. I have a feeling it was introduced to make Managed C++ a little easier - .NET obviously distinguishes between interfaces and abstract base classes. Thanks a lot for the help anyway, Pete -
muliple-inheriting two functions with identical signaturesHi, That'll work! I think I'll implement the CreateClone(...) methods as you suggest. A shame that standard C++ won't let you explicitly override a specific base class's pure virtual, but that's life I guess. I'm sure there's a good (and suitably obscure) reason for it. Cheers, Pete
-
muliple-inheriting two functions with identical signaturesHi, thanks for the reply. The reason they're virtual is pretty much standard interface inheritance. Instead of clients using a C3DCamera instance directly, they will use it's ICamera interface. I need the clients to not expect a C3DCamera, as I'm extending my application with another class (C2DCamera) that can provide ICamera functionality, but NOT IOrientation. Clients that only use the ICamera interface should be able to use either C2DCamera or C3DCamera interchangably. Does that make sense? I need both interfaces to expose a CreateClone() method because clients of both interfaces need to be able to make local copies of the instance that's implementing, without knowing the concrete type of the instance. Unforunately I don't have a copy of ARM at my current workplace. It's not available online, AFAIK. I'll have to bug my boss for a copy, I know it's kinda the bible for C++. Thanks again for the response, Pete
-
muliple-inheriting two functions with identical signaturesHi Ryan, thanks for the reply. I could well be wrong, but I was under the impression that the code you gave wasn't valid standard C++. If possible, could you point me towards something that describes this syntax? Cheers, Pete
-
muliple-inheriting two functions with identical signaturesHi Ravi, thanks for the reply. I think maybe I'm misunderstanding, but I think you're saying I should perhaps do something like:
class IClonable
{
public:
virtual ~IClonable()
{}virtual IClonable *CreateClone() = 0;
};class ICamera : public ICloneable
{
//...
};class IOrientation : public ICloneable
{
//...
};class C3DCamera : public ICamera, public IOrientation
{
public:
//...
ICloneable *CreateClone();
}Is that correct? So in this scheme clients of IClonable would presumably be static_cast<>ing the result of CreateClone()? Sounds sensible to me. I'm vaguely worried about the whole 'Diamond Inheritance Considered Evil' thing, but from my understanding (which I admit isn't great), the evilness doesn't apply to abstract base classes, right? One final thing. You mention creating a common IImagingLibObject interface. I don't understand the reason for doing that. Again, thanks for the advice! Pete
-
muliple-inheriting two functions with identical signaturesThanks for the reply PJ, I appreciate it. I'm surprised, I didn't think this was possible in C++. Do you know if this is Microsoft-specific? I couldn't find anything about non-Visual C++ explicit overrides anywhere. It also seems that the base classes have to be declared as an __interface, which is MS-specific. If I had a choice I'd rather avoid doing anything non-standard, especially when it seems that porting to another compiler would involve re-designing the class architecture of the application, as opposed to re-writing method implementations, etc. Cheers, Pete
-
muliple-inheriting two functions with identical signaturesHi all, I was hoping for some advice regarding multiple inheritance. In my application I have two interfaces (abstract classes), ICamera and IOrientation. I also have a class C3DCamera, which inherits from both interfaces:
public class ICamera
{
public:
virtual ~ICamera()
{}virtual ICamera *CreateClone() const = 0;
//...
//rest of ICamera's interface
};public class IOrientation
{
public:
virtual ~IOrientation()
{}//...
//rest of IOrientation's interface
};public class C3DCamera : public ICamera, public IOrientation
{//ICamera implementation
ICamera *CreateClone() const;//...
//rest of C3DCamera's declaration
}Now, I need to modify IOrientation's interface by adding a
IOrientation *CreateClone() const
method, but of course I can't because C3DCamera can't have two methods with the same signature. I was hoping I could dis-ambiguate between the two like you can with interface method implementations in C#, but it seems you can't (right?). So what I'm looking for is some advice on what the best way to proceed is. I need both interfaces to expose some form ofCreateClone()
functionality, so that clients can create local copies of classes that implement those interface. Here are the options I see:- simply rename the interfaces' methods to CreateICameraClone(), CreateIOrientationClone, etc.
- Use the technique I read about in Item 43 of Effective C++ - create CCamera and COrientation classes that declare pure virtual CreateICameraClone()/CreateIOrientationClone() methods and define a n overrideable default implementation of CreateClone which calls the appropriate pure virtual method
- ????
Option 1 would be the simplest, but seems a little messy to me. Option 2 is the 'recommended approach', I guess, but seems a little forced. Anyone have any other options, or advice in general? TIA, Pete
-
A Design question [offtopic?]I think the DBManager concept is interesting, particularly the use of Reflection and Attributes. However, I think it /would/ be overkill in this case :) Also, it could get complicated for certain things - e.g. the Member table contains pictures, which I don't want to fetch every time I get member info. Obviously, the DBManager concept could be extended to cover that kind of thing, but then we're certainly deep in overkill land. The reservations I have with the design you suggest is that I'm still left with a Member class that's got various levels of abstraction. While on the one hand it's exposing simple getter/setters, and it's also doing higher-level abstraction utility functionality - e.g. UpdateLastOnlineToNow(), CheckExpiryDate(), UpdateWithInputFromWebForm() (I should have mentioned that one earlier I guess). Any other suggestions ;) No, seriously, thanks for the input. It's been helpful. Keep it coming ;) Cheers, Ptete
-
A Design question [offtopic?]Hi Skynyrd, Thanks for the response. To clarify, the DBManager would just be responsible for wrapping the Member table in the DB, or wrapping all the tables? I'm also not sure how the coupling would work with the three classes you mention. The way I see it, Member should be hiding/abstracting over some of the internal properties of a Member. For example, LastOnline shouldn't be settable, it should just be updatable to DateTime.Now. That being the case, both DBManager and the utility class would need access to the internals of Member, and I'm not sure how best to accomplish that. That was why I thought of having a low-level wrapper (which would expose those internals), and then a higher-level wrapper, which would be, as you say, a Member 'object'. But with that design, I'm not sure if it's feasible to have a seperate utility class. The utility class would need access to the internals, but the client of the utility class presumably wouldn't be able to access them. If this were C++, I'd consider making the utility class a friend of the lower-level wrapper, but AFAIK that isn't possible in C#. I hope you don't think I'm being argumentative about this, I'm honestly just trying to figure the best way to design this sucker. I do appreciate your input! And yes, as you say, all of this probably /is/ overkill for the app, but like you I like to try and keep my design as clean as possible (within reason!). Cheers, Pete