April 29, 2024, 12:07:02 PM

News:

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


2.0 Issues

Started by Rock Ridge Farm (Larry), March 12, 2011, 06:21:07 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

whitenite1

Clint, did you first exit 'skeleton2.exe' before trying to re-compile? I know I've accidentally tried to re-compile a program after making some changes, forgetting to quit the running program first. Just a thought.

whitenite1

ckoehn

Yes I did.  I couldn't find it in task manager in the program or processes.  I think I basically duplicated Bruce's problem.

In fact I deleted "skeleton2.exe" under the iwb2 project folder and it made no difference.  Is there another place that the exe file would be written to?

Later,
Clint

LarryMc

I remember reading something, somewhere, about win7 storing files in two different places.
Can remember how that works or how it may or may not impact IWB2.

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

sapero

March 20, 2011, 09:33:14 AM #103 Last Edit: March 20, 2011, 09:44:54 AM by sapero
Windows 7 prevents an application from modifying and deleting dll/exe files, if the application is not installed in one of the trusted locations, like Program Files. The application will be able to create an exe, but after closing a handle to it, it will be not allowed to modify/delete it:

FILE f
if (OPENFILE(f, "blah.exe", "W"))
MESSAGEBOX 0, "Error creating file", ""
else
CLOSEFILE f
if (!DELETEFILE("blah.exe"))
MESSAGEBOX 0, "Error deleting file", ""
endif
endif


You can run the IDE as an admin, hoping that the linker will inherit admin token, or install the software in a trusted location.
In the first case, you could also try adding a manifest to the linker, to be sure that is will inherit the administrator token:

/installdir/bin/elink.exe.manifest
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity processorArchitecture="*" version="2.0.0.0" type="win32" name="IWBasic linker"/>
<description>IWBasic linker</description>
<ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
<ms_asmv2:security>
<ms_asmv2:requestedPrivileges>
<ms_asmv2:requestedExecutionLevel level="asInvoker" uiAccess="false" />
</ms_asmv2:requestedPrivileges>
</ms_asmv2:security>
</ms_asmv2:trustInfo>
</assembly>

ckoehn

I does seem to have a problem installing in the default directory "C:\Program Files (x86)" on Win7. I didn't try everything that sapero mentioned, but I did try to run it as administrator and it didn't work.

I re-installed it under the root directory "C:\iwbdev" and everything works as expected.

Later,
Clint

ckoehn

I wrote too fast. :(

I tried it several times and it seemed to work.  I shut the IDE down again and reloaded and tried again.  And it doesn't work.  Something to do with making a project out of it.  It will compile and run as a standalone, but not as a project.

Later,
Clint

ckoehn

I challenge anyone to make it work. :)

Create a new project and give it a name.

Load a file and attach it to that project.

Compile/run it.  It will work the first time.

Exit it.

Compile/run it.  It will not run again until you exit the IDE and start it backup again.

It almost looks like the IDE stores a list of running project exe's that does not get cleared out when the program ends.  You will not find it anywhere in task manager.  You can even delete off of disk.  Nothing makes any difference.  You can change the program name under Options and it will run only once.  Then you cannot compile and run it again.

The program that Bruce had is very basic.  It is coded right as far as I could see.  It should work.

Later,
Clint

Brian

Well, I took up the challenge, and won it!

Maybe it's because I'm on Win XP SP3 - I just don't have any problems. IWB is installed
in the installer's default places. I have now got six of my IBP/EBA programs converted
(with minimal effort, usually the odd RETURN 0's), and they all run fine

Now that is not to say that when IWB was first issued I didn't have problems - I did. But
downloading Sapero's latest Includes fixed a lot for me, including not being able to re-compile
programs without having a quick re-boot

Try the latest includes in Tips and Tricks. Turn on Zero Local Variables in the compiler options
(that worked for one of my programs)

Brian

ckoehn

I should have said Win7 x64, shouldn't I have?  ;D

I think that I have sapero's latestes includes "IWBasicHeaders10March2011".

I tried different Compiler Options but none of them seemed to work.  There was none checked before.

I think the thing that is frustrating, is the EBasic works fine on the same file on Win7 x64, installed in the default directory.  It just seems that IWBasic should also be able to be installed and run the same program, just like EBasic was.

I am trying this mostly for Bruce.  Most of my programs I don't compile as projects,  but there are some that it is preferred to do so,  so I would like to see it work.

Later,
Clint

Pip1957

Win 7 64bit sp1, Tried this as a project and the only time I could recreate the error is if I click compile and execute button or menu option, if I choose rebuild all it works ok and you can rebuild as many times as you like with no error.

ckoehn

Pip1957,  you are right.

If I click on Rebuild All, then click on the button that "Runs" it, it works.  And yes, I can do that as many times as I want.  It is a work around.

Later,
Clint

Bruce Peaslee

It works for me, too.

Thanks to everyone who took the time to help sort this out.
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

Barney

Quote from: ckoehn on March 20, 2011, 03:01:12 PM
Pip1957,  you are right.

If I click on Rebuild All, then click on the button that "Runs" it, it works.  And yes, I can do that as many times as I want.  It is a work around.
I can confirm this behaviour on W7 x64. EBasic works regardless of the compilation type. IWBasic does not work if Compile & Run is used.

Barney

Barney

Khm, khm...

I am sorry to be the one that rocks the boat but I'd like to know if us who are using Win7 x64 are the only ones who cannot click on source or project files in order to start working? Same question goes for the drag & drop operationwith source or project files. I know and understand that Sapero is probably overwhelmed at the moment but this is something I think really should be sorted out before other things.

Sorry once again, but I simply can't work properly by using File->Open approach, and if the solution is not found relatively soon I'll regrettably have to leave one of the few languages I've grown up to enjoy. :(

Barney

Brian

Hi,

I can confirm with XP SP3 that double-clicking on an iwb or iwp file that it
opens the IDE, but not the actual file. Not a ball-breaker, but a bit annoying

(And still no icons!)

Brian

Barney

Yeah, it's the same here. Clicking on the file opens the IDE but not the file. Same as not being able to work straight away and perhaps it's not a ball-breaker for you but it is for me, due to the way I work.

At least I know it's not W7 x64 problem only.

Barney

sapero

Hi guys, the problem with icons and opening files is related to the protection system.
The iwbdev.exe executable is not the real IDE, this is an Borland-made app which extracts the IDE to temporary file, and then deletes it when you close the IDE. If you register file extensions, clicking an iwb file will load that file to the running IDE, but if you close the IDE, it will be no more working. File icons will be valid while the editor is running, because there is a reference to our temporary executable, so after you close the IDE, file icons will be valid only in the cache of your file manager.

The problem with icons can be solved if we save the icons as regular .ico files, and register paths to .ico files instead to the temporary .exe.
The problem with executing the IDE when clicking a source file, could be solved by hardcoding executable name in the file extensions registration command - iwbdev.exe instead the temporary exe (the current module name).

billhsln

I am running Win 95, I registered IWB to run iwbdev.exe, which seems to work partially.  When I click on an IWB file, the IDE does start, but it does not pull in the file, what I get is the following error:

Windows cannot find 'C:\Documents and Settings\All
Users\Documents\IWBasic\MyProgs\DirectoryFileSize.iwb'. Make sure you
type the name correctly, and then try again. To search for a file,
click the Start button, and then click Search.

Maybe we are having problems with files, due to spaces in the full file path 'All Users'?  Just a thought, it was a problem in prior a prior version.

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

ckoehn

Thanks for your reply to this problem sapero,  but why does EBASIC work?

I too can confirm this on Win7 x64.

Clint

LarryMc

EBasic used a much, much more expensive license software that worked differently.

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

sapero

Good news: the icons are now working, and the IDE loads files from the file manager (explorer).
I just did as said:
1. added four icons to the setup, so they will be installed in /bin folder, changed the register file extensions code to link file types to pure icon files instead icons embedded in the IDE as resources.
2. Created a helper program for DDE processing. It will be executed by the explorer when you doubleclick a source file. It will then execute the IDE and forward to it DDE messages received from explorer, with a total timeout of 5 seconds.

The helper program is working okay so far, but it depends on the file name of the real, temporary, extracted IDE. On my system this is a hidden file in /bin directory, called iwbdev_xshld4.exe. If the file is same on your systems, or does not change, all will be working, at least until we find a better solution.

Going back to make a note and upload changes.

LarryMc

It's also iwbdev_xshld4.exe on my computer.
LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

sapero

Okay, I've uploaded the helper app and integrated it with the setup (it can't be downloaded yet because LarryS is away and cannot test it/upload to the server.

If you want to test it, the source is attached (requires windowssdk.inc). How-to compile and install manually:
1. Compile as "windows" target.
2. copy the generated exe to iwbasic/bin directory (it must be able to run iwbdev.exe).
3. In regedit, navigate to HKEY_CURRENT_USER\Software\Classes\IWBASIC\shell\open\command
4. edit the default value replacing the exe name with ddehelper.exe. It should look like:
"C:\Program Files\IWBASIC\bin\ddehelper.exe" /dde
5. doubleclick any iwb file - the IDE should open/focus and load the file. The helper app will terminate after 10 seconds from the last DDE activity.

Note: the subkey you modified in step 4 handles only *.iwb files.
Let me know if you stuck on an syntax error! Just before uploading, I've noticed and removed WITH-ENDWITH block :)



Added "preprocessor color" button to the editor options (File menu).

Rock Ridge Farm (Larry)

It is ready for download now.

Larry

DominiqueB

Thank's sapero.

Just an error when compiling:

line 121 : SHELLEXECUTEINFO shi = 0

don't want to put an int to a structure !

Had to delete the "= 0" and now it works.

Dominique