Avatar of PMH4514
PMH4514
 asked on

Need small utility app re-written in C++ 2005 Express Edition

Ok, long story short, I have a very small test app which I am using to locate a flaw in Win2k or NTFS I think we've encountered. I am fairly certain the issue is actually a Windows bug, or an NTFS bug of some sort. Microsoft told me that they won't open a ticket to give me actual consultant assistance because VC++ 6.0 is an obsolete product. They pointed me to Visual C++ 2005 Express Edition, a free download, and said that if I could reproduce the problem with that, that I could open a ticket. I downloaded it and loaded it up, but, my goodness, it seems like an entirely different language! Nothing at all familiar to me. My VC++ 6.0 project certainly won't compile in it and I don't have time to learn a new platform today :)

So, since I'm in a time-crunch, I come here! If somebody who is familiar with the new technology could rebuild this very small test app and send me the complete set of project files, it would help me emmensly, as I could then verify the issue using a non-obsolete product and get MS assistance.. Open it up in VC++ 6.0 and see what it does, it's very straightforward. Then rebuild it to do the same thing.

In a nutshell, this app lets you specify a quantity, loads a source file (included in my zip) as an HBITMAP using MFC's LoadImage() and then saves it out, the specified number of times, to a filename that is generated using GetSystemTime (merely for unique names) in the e:\complete folder using SaveBitmap() (my own method you'll see in my code)

For what it's worth, the issue here is that once this creates around 20,000 files in a single folder, the partition, or MFT or something is going corrupt, and the OS can no longer reload. So if you're testing your work, keep your quantity value small (anything under 15,000, but you really only need 1 really to test and there is no issue with small numbers of files). Change the drive letters as you need, but again, don't run it with any big numbers as you risk taking down your machine. I've run it hundreds of times using a value < 10 with no issue. On every Win2k box we've tried it on, 20,000 times will hose your machine.

My entire VC++ 6.0 project file (as well as source.bmp file the code looks for) is located here:

http://www.gigasize.com/get.php/63348/testcopysave.zip 

Yes this sounds like an odd request, but I'm sure that anybody familiar with both VC++ 6.0 and the newer VC++ 2005 could do this very quickly, but it's worth 500 points to me. So the points go to whomever can get me a zip file containing a full project I can open in VC++ 2005 Express. Hopefully my existing code doesn't need too much modification and if the solution comes real quick, I'll post another follow up question merely to award an additional 500 points.

OR - if you look at this code and happen to know why the partition info would be wiped out having run it upwards of 20,000 times and can actually point me to the root cause/solution (ie. what I'm hoping the MS folks can do for me) then you'll get the points as well.

Could it be something in my code? Sure, possible, but I am really convinced this is an NTFS issue.

thanks!


C++

Avatar of undefined
Last Comment
PMH4514

8/22/2022 - Mon
grg99

ok, I'll give it a shot.

PMH4514

ASKER
thanks. you may recall our last conversation with regard to the leading zeros/long filenames - this goes to the same thing.

I thought we had it resolved when we shortened the filenames and didn't use all leading zeros, but in fact we didn't.

grg99

okay, it went pretty well with VC 2005 Express.  There was a __RPC_FAR symbol that had to be #defined to nothing.

Then a whole bunch of .h files that needed an include directory setting.

And had to set the lib option to multi-threaded DLL.



What problem are you having exactly?

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
PMH4514

ASKER
>>What problem are you having exactly?

what problem am I using this utility to test for or what problem am I having rebuilding the app with VC2005 Express?

re: express, everything just seemed foreign from the IDE to the syntax and I have no time to try to learn it. The only reason I need the utility rewritten in VC2005 Express is so that Microsoft will agree to give us help directly in finding the problem.

re: the problem I am using this utility for, well, it's the same problem you and I were working over in this thread from last week:
https://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_21964707.html

I thought the leading zeros was the issue. It is not. We have been able to reproduce the operating system failure using this test utility to load and re-save more than 20,000 of the bitmap files regardless of the filenaming. We've worked our heads down so many routes these past two weeks involving code changes, partition setup changes, MFT allocation changes etc. etc.  to get it repeatable and figure out where the issue may be. Finally we decided to try to get a microsoft consultant to help us, and, as I said in my first post, they wouldn't assign anybody since the app with which I am producing what I think is an NTFS bug, was written on an obsolte platform. Having to rewrite the test app in VC2005 Express only so they'd help, but  having no time to dedicate to a learning curve for the new IDE and syntax that I was confronted with, I came here to "have someobdy do it who already knows how." Simple as that! (I knew it was an odd request)

So all I need is a set of project files that I can open up in VC2005 Express, compile and run on our test machines, so that I can open a ticket at MS for a consultant with code that they'll actually agree to look at.  

:-)
PMH4514

ASKER
oh and just to allow this thread some relevance to others who may be searching at a later date, once we know the root cause and solution, I will keep this thread updated.

I'm always willing to admit the problem is my code, but all signs are really pointing to an OS flaw that does not appear to be documented (not that any of my team has found, but we could be searching for the wrong thing), this is why I want direct Microsoft consulting support. They may say it's my code, show me the problem and be done with it. As long as it's fixed I have no issue with that haha.  But I'll add comments as I know more.
sushrut

PMH4514,
I am not sure if this is what experts-exchange is meant for.
Possibly moderators should comment on this.
---------------------------------------------------

BTW,
I work as software consultant (for investment banks - C++ work).

I am not a windows guy. I have no experience of working on file systems. So I do not understand much about this specific work. Hence I should NEVER comment on time and cost estimation of this work.


If I was an expert in this type of work……
------------------------------------------------------
I feel 500 points is kind of unfair deal here. (I may be wrong and people SHOULD shout a me if I am wrong)
Why do I think its unfair deal???

1.
Considering the risk of some one else giving solution before me (wasting my efforts) my cost should shoot up a lot.

2.
Considering that you get a solution, tested and accepted BEFORE you award points, it reduces risk for you and you should be paying even more.

3.
You can buy 1000 points @$12.95USD. Hence 500 points = USD $6.5
If I assume 500 points to be same as USD6.5 then
Compensation per hr = USS6.5 / number of hrs of efforts
Now I should think how compensation per hr compares to my billing rate.

Experts here do this work for fun and enjoyment. Its not possible to calculate fun and enjoyment in terms of $$.
However, I feel that 500 points for this work is too less of compensation for the task.
Please shout at me if I am wrong.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
sushrut

PMH4514,
I apologize if my previous post is hurting your feelings. I have no intensions to target any person.
I just want to trigger discussion about fair compensation for the task.
PMH4514

ASKER
would it have made you feel better if I hadn't included any comments about needing it in order to open a ticket with Microsoft? If I had simply posted code and said "I need this rewritten to work in VC2005 Express?

What is the difference? It's a very small test utility with no commercial intent. In fact if you look at grg99's response, it took him all of 26 minutes.

People on this board spend considerably more time on bigger issues for folks who have commercial intent.
PMH4514

ASKER
also sushrut I'm not sure I understand your #1 and #2 issues. Are those not the same concerns regardless what the EE question is? My code already worked, I just needed it quickly ported by somebody who was familiar with the VC2005 Express IDE and associated differences.

oh and I know it wasn't personal :)
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
grg99

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
PMH4514

ASKER
well those are the issues I was having.  Not so much in the IDE itself, rather, the code syntax. Plus, when I opened a new project in VC8, created a new form and started adding code, all the code looked different. Everything coded to namespaces and such. MFC commands I was used to didn't appear to exist, it was like a whole new model (which I guess it is)

I wonder though if MS will tell me then "you wrote this in VC6 syntax, can't help you"

I mean, is their issue with the platform or the syntax of the code?
grg99

DONT OPEN A NEW PROJECT!!

Just do a convert and things will go a lot better.

PMH4514

ASKER
yah I had done the convert originally, and got all the errors you listed but had no idea how to handle them.

and then, when I tried to open a new project (I figured, hey, this is such a short app, just two functions,  it should be quick) -  I tried to open what I thought was the equivelant of "new MFC ProjecT" and all the code it started with, the code it generated when I added buttons to the form and such, looked completely foreign to me.

Why is that? I do admit I've been working with VC++ 6.0 for the last two years and haven't explored where it's been going but it literally seemed like a different language.

so can you zip up your converted and compiled project and send it to me or are you avoiding doing so due to sushrut's comments?

I'll go give it a crack, but man they are breathing fire down my back today :)
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
PMH4514

ASKER
I just converted, and hit F5 for rebuild. The message I got was:

1>------ Build started: Project: testcopysave, Configuration: Debug Win32 ------
1>Compiling...
1>StdAfx.cpp
1>e:\testcopysave\stdafx.h(15) : fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory

I found afxwin.h at C:\Program Files\Microsoft Visual Studio\VS98\MFC\Include  (is using this old stuff going to prevent MS from opening a ticket?)

"project properties/Extra include directory."  - where is this in the VC2005 Express IDE? I don't see it anywhere
PMH4514

ASKER
I did add C:\Program Files\Microsoft Visual Studio\VS98\MFC\Include under:

Project ->Properties / Common Properties / Additional Reference Search Paths, hit apply and OK and then F5.

Got the same error, can't find afxwin
PMH4514

ASKER
hmm.. oh well, you didn't actually give me code, but I was able to get it working.. .AND... well, we updated our machines to XP and the problem with NTFS is no longer presenting itself. For now we're accepting that we don't fully understand the "root cause" on Win2k and moving on.
Your help has saved me hundreds of hours of internet surfing.
fblack61