Hi Steve and Rick,

    Just got home and read all the comments and yes Steve you have to be 
careful for as I had stated, studio changed that run time dll each new version 
they came out with. The original Python one only uses the MSVCRT with no 
number, but as both progressed, into Python 2.6 and later, along with studio 
from 2010 and later they started adding numbers to that dll and those run times 
have to be compatible, but I suspect it depends on what you want from it.

    For I discovered that some of it is reverse compatible and I was really 
only interested in the input command, and the display command, which are 
MSVCRT.getch and print respectively in Python.

    It is not a big priority since I can use the hotkeys since there the hotkey 
is assigned to the given window you want it in, which is perfect for what I 
need. The rest is how not to use up CPU time while waiting for an input.

    I will check on that link Steve, but I suspect I have already read it. 
    Rick, I will take a look at what you suggested since I have not yet 
experimented with projects in a major scale, just simple events and such at the 
moment. I was searching for the documentation on how to set up, make a DLL and 
was certain I had all that information from the knowledge base at the beginning 
of the semester when searching for the information on how to compile C++ 
programs and run programs without using the IDE. For it seemed the DLL stuff 
was with the needed command utilities to compile from the command prompt which 
I did all semester in the C++ course. For all my programs were written using 
that and all of them are now stand alone programs or .exe files. I had to 
upload both the text or .cpp files along with the .exe because of the issue 
with notepad changing back and forth from ANSI to Unicode formats which seem to 
happen at random. My professor was using a non-Windows compiler and it did not 
like Unicode formats, but Studio was all fat dumb and happy with either format.

    I just want to spend the summer working with DLL's and what I could extract 
from them.

    Yes Rick, it would be nice to get at least some of the commands from that 
library, but as Steve hints at, Script was designed to prevent people from 
using certain commands that would give hackers the ability to hack your 
computer and act as a local user...

    I did read up on the memory stuff this week and it does gives examples on 
how to set it up and make sure you call the proper command to destroy them, so 
no memory build up happens and lock up the system if still referenced...

    It is my learning tool, using games as my motivation, then the rest comes 
from there; just like the text book examples do.

    I got an email from someone to make the cuckoo clock program as a stand 
alone without a screen reader and that could be done using the same commands, 
just spelled differently and having it all come for a simple web page that is 
running all the time; I think that is kind of how things are done anyway, for 
lots of the commands are almost identical, just spelled a little differently.

    that person is an assistive technology person who was asking, since some of 
his students do not have a screen reader program.

    But, once the DLL is mastered then more hooks can be made and who knows 
what I can write at that point for Windoweyes.

    Thanks guys, will start reading again.

        Bruce


Sent: Friday, June 21, 2013 9:19 AM
Subject: Re: Registering A Dll For VB


Greetings,

Just to minimize any misunderstanding concerning the C runtime, I think the 
following page might help: 
http://stackoverflow.com/questions/2766233/what-is-the-c-runtime-library. Note, 
in essence, that this is a set of components needed for C or C++-based 
applications to communicate with the Windows operating system. The C runtime 
has nothing to do with .net (unless the .net component needs to make unmanaged 
calls to the OS). Higher-level scripting languages such as VBScript and JScript 
cannot make direct calls to the CRT, though it's possible to execute VBScript 
and JScripts from a C/C++ application. More fully featured scripting languages 
(e.g. python) have mechanisms for directly accessing the C runtime and dealing 
with native C data types. Note, though, that doing this also requires you be 
intimately familiar with how the operating system manages memory as accessing 
the OS at such a low level requires you to manage your data as needed. For 
instance, if you instantiate a pointer and associated memory for an object on 
the heap inside a function, both the memory and pointer must be cleared once 
you're done with them.

So, while it's important to ensure your program is bundled with the appropriate 
C runtime, it should only be necessary if you're distributing an application 
which was compiled with a version of Visual C++, or, in Bruce's example, you're 
using a python freezing tool. As the python interpreter is itself a C program, 
it therefore requires the correct runtime be available.

If you're not distributing a C++ program, then you don't need to worry about 
the C runtimes.

Regards,
Steve



On 6/21/2013 5:51 AM, RicksPlace wrote:

  Hi Again Bruce: OK, I reviewed the MSCRT dll and found out what it all means 
and understand what you are trying to do.
  I am not sure you can hook into the MSCRT dll from within a VBScript in any 
case but I could be wrong.
  There seems to be allot going on in the Visual C Library which may require 
access to framework objects - I didnt see that mentioned but it sounds logical.
  There is some kind of problem with VBScript where it can not do some things 
and as a result cant tie directly into many of the Managed Libraries which 
MSCRT may do.
  The idea is great and, if it works, would provide some very nice features to 
scripting but it is beyond me.
  The only thing I could think of would be to experiment trying to include it 
in a script somehow. If you want to hook into it via a C++ program I think that 
is doable enough then you could hook the script via methods in the C++ program. 
I think it could be done in a C# program but I didnt see anything on that other 
than a blurb on setting some compiler options - and I am not sure that wasnt 
really suppose to be for C++ since I didnt dig into the details.
  Make sure you have a backup of your system if you muck about with that puppy 
since I saw allot of olks who had major problems with it for one reason r 
another with one of the symptoms not being able to boot up if I remember.
  Sorry I cant be more help but you are digging pretty deep into some pretty 
cool stuff and I am just an old fat blind guy who does a little application 
programming usually related to Financial Platforms.
  Just out of curisoty let me know if you get it working as it may offer some 
very interesting options to scripts.
  Rick USA

    ----- Original Message ----- 
    From: BX 
    To: [email protected] 
    Sent: Thursday, June 20, 2013 2:03 PM
    Subject: Re: Registering A Dll For VB


    Hi Rick,

        I use all features of Python and the Trek Game, along with the 
Battleship game, are both written in Python and I compile them for portability

        I had issues and problems when getting stuff compiled and had the wrong 
version of PyInstaller. I think I got taken to the wrong web site and that is 
always a problem.

        I now have a real good working PyInstaller now and I can compile on any 
of my computers, Python25 or Pyth0on27. The best one is Python 2.5 and 
modifications were needed for Python 2.6 and later and that is where it fell 
apart.

        For the needed dll, MSVCRT is packaged differently for each studio 
version, thus causing lots of problems when doing a compile; fixed now.

        I would like to write a dll for studio and I am using 2010 at the 
moment, 2010 express. 
        I would like to make a hook for the MSCRT so the input and display 
commands could be usable inside VBScript in an easy way.

        I have bypassed that now with the keyboard hooks I posted the other day 
by just making dictionaries for all the commands neeeded for any project or 
game.

        So, if you can help I would be appreciated. I thought I had DLL info 
when first installing VS2010 but have been unable to find it since.

            Bruce


    Sent: Thursday, June 20, 2013 5:25 AM
    Subject: Re: Registering A Dll For VB


    Hi Bruce: 2 things...
    First, doesnt nvda use python to develop in? And, if so, do you know if 
python has an easy access to either the MS managed UIA features or if they use 
the Managed version of the UIA features if python has access to the Managed 
Framework?
    Second, you mention 2010 Express which sounds like you may be doing 
something in one of the Visual Studio lagnlanguages. If so I can help you with 
DLL(s) in vb.net and likely c#.net but I am confused if you are working in VBA 
- that sounds like perhaps you are working in Office Products.
    Anyway, what do you know about python and accessing UIA features if that is 
what you are doing.
    Rick USA
      ----- Original Message ----- 
      From: BX 
      To: [email protected] 
      Sent: Wednesday, June 19, 2013 2:01 PM
      Subject: Re: Registering A Dll For VB


      Hi Chip,
          there was nothing there that was of any use. 
          I will live with what I have. I may write an app and compile it to be 
able to use Python for many things...

          My 2010 express seems to not have any Dll stuff, I could not find 
anything, but thought for sure I had found some back when I first installed it 
but have not been able to find it again.

          The key functions I posted are the best solution for now and should 
work just fine. This is why I posted them for anyone can define them any way 
they chose to either using 1 call back function or one for each, so will leave 
it at that.

          Thanks, but have to do outside work and will have to pry myself away 
from the computer because I spent the last 2 days writing  a simple mixer 
program which almost could be used as a Python version of the PlaySound 
function/object with the added feature of repeats and volume adjustment. It 
actually works with a few minor bugs which can iron out some later day.

              Thanks, Bruce


      Sent: Sunday, June 16, 2013 8:14 PM
      Subject: RE: Registering A Dll For VB


      Bruce,


      The first example I see is his ironcom.net, meant for sharing some .net 
objects I think.  



      His other app I was remembering is named HomerJax, it implements shared 
objects in Jscript.  Due to an unfortunate bug in GW's appGet however, this 
won't show up for you as a choice unless you uncheck the "show English only" 
choice in the appGet's "View" menu; the HomerJax app apparently has no language 
specified, so it doesn't show up with the English apps, and this is the default 
for appGet.  Once you uncheck this, you should see it in the "general" category.


      Hth,


      Chip



      From: BX [mailto:[email protected]] 
      Sent: Sunday, June 16, 2013 6:18 PM
      To: [email protected]
      Subject: Re: Registering A Dll For VB


      Hi Chip,

          I found out you have to call a shell command, which I think would 
work using the run command from a shell object made in VBScript.


          Also, the dll I wanted to load was the MSVCRT or future ones, which 
are changing each time Microsoft writes and new studio, so that idea died, 
besides not being able to call from the dll which is always running.


          Unless someone has come up with a way to call the MSVCR dll 
properties and methods on this list.


          which app examples did Jamal write or where are they, or what are 
they called?


          It certainly would be nice to use the Python sound mixer apps because 
there much easier to use, including id and volume control. They also use the 
MVCR dll by actually calling it by name, for they wrote a module for it using 
the same name.


          So, if you can give me the location of those examples he wrote and I 
will take a look at them.


              Bruce




      Sent: Sunday, June 16, 2013 5:22 PM

      Subject: RE: Registering A Dll For VB


      Bruce,


      You can't from VBScript.  I don't know Jscript, but I'm under the 
impression it can use a DLL; if that's correct, you could use it or Python and 
write some glue routines which are shared, and have them call the dll.  I 
believe Jamal wrote some examples of shared Jscript apps.

      Of course you could write glue routines in vb.net and have them call the 
dll as well.


      Hth,


      Chip



      From: BX [mailto:[email protected]] 
      Sent: Wednesday, June 12, 2013 9:21 AM
      To: [email protected]
      Subject: Registering A Dll For VB


      Hi!

         How do you register a dll for sharing inside the we object model?


              Bruce




-- 
Stephen Clower
Product support specialist & App Development
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com

Reply via email to