April 24, 2024, 11:49:57 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


FolderRequest (from Sapero)

Started by billhsln, December 20, 2014, 01:11:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

billhsln

I am doing 2 FolderRequests, the first seems to work ok, the second aborts.  They are called the same way, just one after another.  I know I must be doing some thing wrong, but I am not seeing it.

As always, I do appreciate any help.

Thanks,
Bill
When all else fails, get a bigger hammer.

Egil

Had to rem out the line saying $INCLUDE "..\\Console_Colors.iwb" to get your code compiled.
After that both subs work fine here on my win7/64 pc.
Both routines return the length of the path string.
This indicates that you ought to check the parameters you are sending to the subs when they are called.

Good luck!
Support Amateur Radio  -  Have a ham  for dinner!

LarryMc

Quote from: billhsln on December 20, 2014, 01:11:45 AM
..... the second aborts.... 

what do you mean, "it aborts"?
you don't get to see the result of the second selection because you are missing a WAITCON right before the
CLOSECONSOLE command
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

I get the prompt for the second directory and it immediately aborts.  Attaching screen shot.  Running Win 8.1 Pro 64.

Bill
When all else fails, get a bigger hammer.

LarryMc

I don't have a win8 machine to try it on.  Hopefully, someone else with a win8 machine will try it.
Sorry.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

just for kicks put a second
ipath = GetStartPath
just before the 2nd if folderrequest
and see what happens
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Egil

All the "unexpected" errors, similar to what you have there, was the reason why I threw out my brand new pc running Win8/64. I changed back to Win7/64 Pro.
Many programs would not even compile on my Win8 system. (I was still working using EB when I tried). So I gave the computer to my grandson, who is quite happy using it as a "Media Center", e.g. an advanced video player. And that is in my opinion the only thing Windows 8 is good for on ordinary pc's.

I am glad I do not do programming for a living these days...


Here is what your code looks like on Win7/64:
Support Amateur Radio  -  Have a ham  for dinner!

billhsln

I am stuck with Win 8.1 Pro, must have pro for work.  Maybe the Beta version will work better.

Maybe I can figure out how to run another operating system from the same machine, which might solve my problems.

Bill
When all else fails, get a bigger hammer.

LarryMc

I spent a couple of hours begging my wife to let me borrow her new HP Pavillion 2 in 1 laptop running 8.1.
I put it in classic mode and installed IWB and ran your program and it worked fine.

Maybe it is a pro issue.

I'd try running iwb in compatibility mode as well as your program in in that mode to see if that makes any difference.
We really do need to know what is going on so we know how to fix it for the future.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

How do you get to the 'Classic' mode?  Or is it a setting on or for IWB?

Thanks,
Bill
When all else fails, get a bigger hammer.

LarryMc

My bad.
My wife had downloaded and installed "Classic Shell" from  here
http://classicshell.net/ so it looks like win7 pretty much.
It's free.

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

fasecero

I don't have my notebook right now but just guessing SHBrowseForFolder probably need the COM library, by calling CoInitialize or OleInitialize.


billhsln

I will give 'Classic Shell' a try.  Win 8.1 has been a problem in other places, it screwed up FTP but I found a work around.  Not to surprised that there are more problems with it.

Thanks for all the help,
Bill
When all else fails, get a bigger hammer.

billhsln

I know I stated this before, but I do believe it is true, Windows is like Star Trek movies, all Odd numbered versions are good and all even numbered versions stink.  Windows 8 is even, which is why it stinks, of course it sounds like M$ is trying to change that by making the next windows as 10, but it is a cheat.  Even though they are naming it Win 10, it is really Win 9.

Bill
When all else fails, get a bigger hammer.

Egil

Quote from: billhsln on December 21, 2014, 12:29:44 AM
I know I stated this before, but I do believe it is true, Windows is like Star Trek movies, all Odd numbered versions are good and all even numbered versions stink.  Windows 8 is even, which is why it stinks, of course it sounds like M$ is trying to change that by making the next windows as 10, but it is a cheat.  Even though they are naming it Win 10, it is really Win 9.

Bill

Maybe M$ already figured out that also the next version stinks so they called it version 10... I don't thrust that people any more, so when they drop support for Win7, I'll change to a Mac.
Support Amateur Radio  -  Have a ham  for dinner!

billhsln

Installed and tried 'Classic Shell', did not do anything for my problem, so removed it.

Added:  CoInitialize(NULL) right after OPENCONSOLE, not sure what that command does, but it fixed my problem.  WEIRD...

Bill
When all else fails, get a bigger hammer.

Egil

Quote from: billhsln on December 21, 2014, 06:08:15 PM
Added:  CoInitialize(NULL) right after OPENCONSOLE, not sure what that command does, but it fixed my problem.  WEIRD...

Which proves that  fasecero was right about the need for initializing the COM library.
Support Amateur Radio  -  Have a ham  for dinner!

billhsln

What does CoInitialize actually do?

Bill
When all else fails, get a bigger hammer.

Egil

Support Amateur Radio  -  Have a ham  for dinner!

billhsln

Funny, CoInitialize also seems to fix the problem with saving source code.  Files that aborted on a save now seem to save ok.

Weird....

Bill
When all else fails, get a bigger hammer.