Click here to Skip to main content
15,396,920 members

Comments by Ron Anders (Top 81 by date)

Ron Anders 27-May-22 8:48am View
Ron Anders 6-Jul-20 13:34pm View
I only got it to not generate and exception. So i haven't posted the "fix". It didn't work, just didn't die.

@ MadMyche

I put your code you posted into play. Very nice and very neat. thank you.
However after it is all said and done WHERE R=@Row generates the same: {"String or binary data would be truncated.\r\nThe statement has been terminated."} error as if we're am trying to assign. I'm not I am only wanting to update the record that matches the Row.

As for Row being a char: I initially had it as an int but the json stringify in the view nulled it so all I got for the row number was "". K, fine just to get this working so I can prove my thinking, be a varchar and we'll cast it over here in the controller for now. if you google this error, Every single return is an assignment issue. This is a comparison! Stupid SQL - which I claim in jest btw. :-)
Ron Anders 5-Jul-20 18:45pm View
I'm familiar with the apostrphy problem and have it handled elsewhere.
I's also familier with SQL injection issues, this program is in the POC stage so I'm just taking the path of least resistance at this point.
Ron Anders 28-May-20 15:14pm View
I can't delete it. Or i would.
Ron Anders 14-Feb-20 14:58pm View
Oh, my! Blazor looks like just what we all need!
Ron Anders 14-Feb-20 13:35pm View
Thanks, but what a pita!

Seems crazy that we cant just spray data on "the terminal" like we would
on a "terminal" - even if it breaks all the rules.

I appreciate what you have taught me however.
Let me pour over it and maybe I can get my head around it.

Ron Anders 14-Feb-20 13:11pm View
No, the page is just a confidence view of the data the controller has and is going to send. The user then clicks a button that calls a function in the controller that does the heavy lifting. I just want to reflect the "play by play" progress as the work is done by the controller.

Right now, if you click the "go" button the table just stares at you like nothing is happening, when everything is. :-)

It's doesn't have to be elaborate. I just can scribble on a page from mvc.

I made a javascript function in the web page to display "hello world" but then googling how to call that function from a mvc controller code led me down paths that seemed way overboard as if I was using the wrong search terms.
Ron Anders 4-Sep-17 22:05pm View
When I go to work tomorrow I will have an opportunity to play with other 64 bit windows os's so thanks for playin' I'll just deal with it.
Ron Anders 4-Sep-17 22:03pm View
No I know bout that too. Ok that file was a bad example. Any file will pop off a auto heal.

This is one of those , No Ron, Just you.

That's ok.
Ron Anders 4-Sep-17 19:02pm View
Thanks for the help.

The 64 bit installer is virgin with no keypaths gone. As a matter of fact, the keypath is in place for usersguide.pdf for example in both the 32 bit and 64 bit installers. Only the 32bit os seems to detect a change.
Ron Anders 26-Jun-15 10:00am View
Sorry, thats what happens when I start in before I am fully awake.

Ron Anders 1-Jun-15 18:17pm View
I am restoring my Acronis backup to yet another drive to make sure that A: the image is sane and B: the xp will clean n' build like I think it did before.

I won't be doing anything dangerous until tomorrow or next week because tomorrow is another darn full moon. What should work generally doesn't for me on the full monn or for two days following.
Ron Anders 1-Jun-15 13:28pm View
UAC in XP.

Ron Anders 18-Mar-15 17:43pm View
Ya lost me. :-)

I have a method provided in the host binary called GetUIContextEx() that is protected (This is what the linker says when I tried to call it directly).

I don't know the class name and am not privied to it.

Ron Anders 11-Jan-15 15:41pm View
Sorry I did not clarify that upon program start I NULL that pointer. It is then initialized by a DLL I've loaded into my process with the address of a variable in the dll of interest. Given that bad things could happen like the dll not loading, I was going to run the risk of using a null pointer. It looked good to my eyes to do if(pointer && *pointer = value) but cool looking and worrisome are two different things.

I guess I'm just concerned about relying on the short circuiting.

Thank everyone.

Ron Anders 2-Sep-14 14:37pm View
Gosh, I know I tried that! - But it's working now.

I can't thank you enough nv3.
Ron Anders 2-Sep-14 12:30pm View
I thought I tried that. I will revisit that.
Ron Anders 2-Sep-14 8:57am View
That's what I am doing now as a work around.
A poor man's IPC bounced off of c:\mosedoubleclick.dat where I store the state of a double click so that when a hooked WM_CREATE comes next, I can act accordingly. This may be too slow
as it woks well in the debugger but misses when running full speed suggesting that the drive IPC is too slow.

The process that knows about the mouse state is 64 bit and the hook is running in a 32 bit process. That coupled the fact that I cannot persist a value or object for subsequent calls to winproc complicates any other normal IPC methods such as MailSlot for instance, where the reader (which would have to be the hookpropc) must be the mailslot creator and so on.

Ron Anders 1-Sep-14 23:16pm View
Perhaps this will clarify better. It describes the exact problem and the thread dies.
Ron Anders 6-Aug-14 9:18am View
During troubleshooting I also included the return from GetWindowText as well as wParam. Sometimes even under "breakpoint throttling" the return is 0. One between each of the Activated Windows where title text was obtained. There were no more 0s logged when running without the breakpoints than there was stopping by hand. That's all I have been able to gleen there.

This a child window. The first Activtated window that arrives has the parent window's title. I ignore that. The next one is has the document name that is open in the parent window. I also ignore that. Then the full child window is to be activated and it's title contains what I am looking for. But again only if I break the code with the debugger.

Thanks for the help. I am grounded until I am able to implement either a work around or just get it working. :-)

Ron Anders 5-Aug-14 18:09pm View
Sorry I did not specify, it is Local
Ron Anders 26-Jul-14 23:05pm View
Well thankfully I did not have to resort to API hooking but it did cause study in this area so I will accept your solution. Thank you. I hooked both CBT and WM hooks and between the two am able to hide the window just before it is created and after the window title is set. All with no evidence that any of this happened.

Onward and Upward!

Thank you again!
Ron Anders 23-Jul-14 18:52pm View
Thanks I'll give that a go tonight.
Ron Anders 27-Jan-14 16:10pm View

Did nothing good. Results the same.
If I could only make my script do to the remote server what firefox does when I put the url and query string in the location bar and hit enter. - That works.

I'll keep at it.
Ron Anders 26-Jan-14 21:54pm View
Looks like header() maybe the way to call the script on the far server.
I'll have to wait until tomorrow to try.

Thanks everyone!
Ron Anders 26-Jan-14 19:43pm View
If I call the GetActCode from the calling server's browser, it works.
But not from the calling server's script.

I did not know how to "simulate" the calling of GetActCode.php but it looked like fopen() was the way to do it with 'r' as it's mode. that's how I am doing it in the calling script.

Should I call GetActCode.php a different way?

Ron Anders 26-Jan-14 18:50pm View
It had not dawned on me to just call GetActCode with a browser pointing at localhost.
Doing so just populates the variables as expected, but when coming in from the LAN, Not so much.

I'll keep at it and let you know.
Ron Anders 26-Jan-14 18:34pm View
Thanks Guys.

Now I have some things to try tonight.
I have run out of tests.

Ron Anders 24-Jan-14 20:43pm View

Thanks man! That did it.

Onward and Upward!
Ron Anders 17-Nov-13 16:03pm View
Most excellent enhzflep,

That fixed it!
Now it pastes good, is good.

Thank you!
Ron Anders 1-Nov-13 18:53pm View
That's what I thought but in this instance I had to be certain.


Thank you all and have a super weekend.
Ron Anders 1-Nov-13 18:41pm View
Thanks. I realize that.

Carry on all. :-)
Ron Anders 17-Jun-13 9:09am View

Pointers to a struck was my first attempt. But I found myself editing gobs of old code where random accesses are made to the matrix causing alot of work. By the time my head was really hurting from flat pointer access to the matrix I thought maybe I could just swap the addresses and nobody would be the wiser.
Ron Anders 13-Jun-13 12:30pm View
Aw Ruddy Heck! - That was it. I had apparently perhaps the release version registered (dll)

Thank you guys!
Ron Anders 29-May-13 15:22pm View
Yup, wrong tree...

That was easy - thank you Marc.
Ron Anders 6-May-13 23:35pm View

My problem was that _Win32 is always defined even in win64 - I did not know that, but I do now
Thank _Superman!
Ron Anders 6-May-13 18:01pm View
Yeah I'll try harder.
Ron Anders 6-May-13 16:30pm View
I used those macros in ifdef / endif checks and if I am in the IDE on a 32bit machine than the
64 bit block is grayed out as expected but when I build the x64 and the x86 versions with the command line script all dlls have the x64's GUIDs and so there is a conflict still.

I have resigned myself to having a 64 bit version of the dll generator code and a 32 bit version in the different configurations with only the GUID const definition as a difference
I would like to have conditional compilation with regard to the const GUID declaration, , but I can't pull it off - yet.....
Ron Anders 6-May-13 15:58pm View
Doesn't work with a command line build
Ron Anders 2-Apr-13 9:39am View
I should be taken out back and shot.

Thank you for helping me see this.
Ron Anders 12-Mar-13 9:54am View
Ya know it wasn't hard (took about 10 minutes) once the light went on. I was in that condition because I could not believe, and still can't that all we can do in a main menu hook is receive a bunch of WM_MENUSELECTS as we scan over the sub menus with no confirmation messages of any kind. I had to be missing something as well as many other poor souls in the net through the "ages" I might add. Some of the posts date back more than a decade. MS wouldn't give us all this and then drop us off here to walk the rest of the way home would they?
Ron Anders 11-Mar-13 23:28pm View
The File Close and RED X are already handled by the application.

I just need to to quick save upon YES
Ron Anders 11-Mar-13 23:03pm View
Gotta save my data when the application I am plugged into (as a 3rd party) saves it's
as my data and it's data are to stay in sync.

The application is a commercial compiled one not mine and there is no API provided in the plug-in spec I an plugged into.

Ron Anders 6-Mar-13 22:19pm View
Thanks a bunch Matt.
It looks like what I need to do. <Thumbs up>
Ron Anders 2-Mar-13 12:45pm View
But if then else is so much less sexy :-)
Ron Anders 2-Mar-13 12:20pm View
Yep, that did it. Thanks ProgramFOX!
Ron Anders 1-Feb-13 8:12am View
Thank you. I'll give it a go.
Ron Anders 29-Jan-13 13:25pm View
Thanks, I did that early this morning. I guess I have to wait for the mods over there.
Ron Anders 22-Jan-13 21:20pm View
Thanks everyone for all your help. I really appreciate it.

@ Andrew Cherednik - Thanks man, your solution fixed it.
Ron Anders 22-Jan-13 19:11pm View
int Bracket = buf.Find('[');

Bracket is always -1 then. That is why I went to the double quotes - which seemed wrong at the time but returned the correct index.

I have to pack up and go home but will try releasing the buf then

Thanks for all the help people.
Ron Anders 22-Jan-13 18:57pm View
Ya know if I don't increment the index, it still crashes......
Ron Anders 12-Jan-13 11:04am View
double comment
Ron Anders 12-Jan-13 11:02am View

What a difference :: makes!
Ron Anders 6-Jan-13 20:19pm View
I certainly shall Monday!

Thanks. :-)
Ron Anders 6-Jan-13 19:29pm View
Andrew Cherednik, that is lovely.

Ron Anders 22-Nov-12 9:44am View
Nice! Thank you so much.
Ron Anders 14-Jul-12 22:40pm View
That worked barneyman.

You are da BarneyMan!

Thank you EVER so much!

Ron Anders 14-Jul-12 22:19pm View
Thank You barneyman,

I haven't got one. I'll try Send Message.

Ron Anders 4-Apr-12 22:40pm View
Reason for my vote of 5
Nice! Thank you.
Ron Anders 30-Jan-12 22:47pm View
Param button is indeed the button pressed if I click on a picturebox or non array'ed label, but for an arrayed label the button param is: 0,1,2,3,4,5,6 etc whether I right click or left!

If I left click, we are dragging the form, if I right click I want to pop up my context menu which is the same regardless of which array item I click on in this application.
Ron Anders 18-Dec-11 12:48pm View

Thank you.
Ron Anders 13-Nov-11 17:24pm View

Thanks for your reply.
I am using vc2008 and no my prototype in only

void SetBcrPreset(int Unit,int Preset);

But I'll change it to extern "C" ... and report back.

It is now:
extern "C" void SetBcrPreset(int Unit,int Preset);

which causes a string of compile errors like so.

1>c:\bcrmaster\control_source\BCRMaster.h(292) : error C2059: syntax error : 'string'
1>c:\bcrmaster\control_source\BCRMaster.h(292) : error C2238: unexpected token(s) preceding ';'

Ron Anders 8-Nov-11 19:57pm View
It does this if I create a new blank project too. over and over btw.
And this particular project does indeed only have one project in it.
I have applied sp1 to it with no change.
Ron Anders 8-Nov-11 16:23pm View
I have seen that over and over. Thanks. I still cant do what it says:


In the Properties window, select the TargetPlatform property.

Choose either Itanium for an Intel Itanium 64-bit platform, or x64 for any other 64-bit platform (such as AMD64 and EM64T instruction sets).

They just arent there and new... is unselectable!
Ron Anders 30-Oct-11 19:13pm View
Gives me hope though. I didn't know about that enum.
I will google and try harder with that solution.

Thank you.
Ron Anders 30-Oct-11 18:53pm View
Class not registered.
Ron Anders 21-Aug-11 16:33pm View
Thanks everyone.

Those MSDN Documents a golden. I've never seen them before.
The problem is somewhere in MonitorEnumProc.

I'll find it.

Thank you again. ;-)

Ron Anders 21-Aug-11 15:48pm View
Here is the MonitorEnumProc code. it is tutorial code I found on the net that I am not really using in it's entirety.

I'll take a better look at that code. Thanks for making me think.

Here it is for better or worse.

Public Function MonitorEnumProc(ByVal hMonitor As Long, ByVal hdcMonitor As Long, lprcMonitor As RECT, ByVal dwData As Long) As Long
Debug.Print "Moitor handle: " + CStr(hMonitor)
'initialize the MONITORINFO structure
MI.cbSize = Len(MI)
'Get the monitor information of the specified monitor
GetMonitorInfo hMonitor, MI
'write some information on teh debug window
Debug.Print "Monitor Width/Height: " + CStr(MI.rcMonitor.Right - MI.rcMonitor.Left) + "x" + CStr(MI.rcMonitor.Bottom - MI.rcMonitor.Top)
Debug.Print "Primary monitor: " + CStr(CBool(MI.dwFlags = MONITORINFOF_PRIMARY))
'check whether frmConsole is located on this monitor
'' If MonitorFromWindow(frmConsole.hwnd, MONITOR_DEFAULTTONEAREST) = hMonitor Then
'' Debug.Print "frmConsole is located on this monitor"
'' End If
'heck whether the point (0, 0) lies within the bounds of this monitor
If MonitorFromPoint(0, 0, MONITOR_DEFAULTTONEAREST) = hMonitor Then
Debug.Print "The point (0, 0) lies wihthin the range of this monitor..."
End If
'check whether frmConsole is located on this monitor

GetWindowRect BCRScribbleStrip.frmBCRConsole.hWnd, r
If MonitorFromRect(r, MONITOR_DEFAULTTONEAREST) = hMonitor Then
Debug.Print "The rectangle of frmConsole lies within this monitor"
End If
Debug.Print ""
'Continue enumeration
MonitorEnumProc = 1
End Function
Ron Anders 17-Aug-11 9:04am View

That part I know, I don't know how to enumerate the monitors and their arrangement. Windows knows but not me. :-). A larger issue I imagine would be the form knowing where it is running, no?
Ron Anders 31-Jul-11 7:52am View
Thanks for your reply.

One thing I don't understand though.
It's an everyday scrollbar. These have been with us since win 3.1 no?

Maybe I don't get the jest of what you are saying.


Ron Anders 27-Jul-11 0:24am View
Ding Ding Ding! or perhaps I should say Beep Beep!

That fixed it.

Fussy little function...

Thank you ever so much.
Ron Anders 27-Jul-11 0:12am View
VS '08

_beginthread did work in another area of the same program where a window was attached to this COM DLL when launching it's WindowProc. I have scrapped that notion for a different approach, but copied the way it was done frankly expecting it to work the first time. But it's rarely how it goes.
Ron Anders 1-Jul-11 18:40pm View
I did just that Albert. I integrated the Window into the DLL class eliminating the Class in a Class that was easiest for proof of concept.

It now works. Three instances requested results in 3 windows with the proper window names I've still some testing but by george and all of you, I think I've got it!

Thanks a million everyone.
Ron Anders 1-Jul-11 14:01pm View
Do you mean if I CALL CreateWindow from a static member there will be only 1 instance, but if I CALL CreateWindow from a non-static member I will create a separate instance?

Just trying to clarify what "do it" means in the context of your answer.

That you very much by the way. ;-)
Ron Anders 27-Jun-11 8:14am View
I don't know. Can I?

Which header files are they by the way?

The reason I want to use ATL is that two different solutions posted on the net for a persistent design implementation issue I have are using ATL.

So I'm blindly going forward in ignorance.
Ron Anders 16-Jun-11 21:28pm View
Thank you very very much.

I am modifying some open source code for with oh 50% of the original code is still there. The only IDL came from the SDK for the DAW workstation software this all runs under. The original developer confessed to being better at good old C that ++ as am I so he may have not used the wizard. I'm going at the ODL backwards as I never had one.

Again, Thank you so much.

Ron Anders 14-Jun-11 12:11pm View
Thank you Albert.

I guess I don't care if the IDE populates. I have used the IDE populating to tell me I'm on the right track. Maybe that's wrong.

I am trying actually to call a static function located in one of three running "Instances" of an object differentiated only by unique GUIDs that
are generated on the fly when each instance is created. Darn, I have this ppv pointer and can figure out how to call my function in an already running

Thank for your help. :-)

Ron Anders 14-Jun-11 11:46am View
CPallini, No I didn't, thank you for the guidance.
Ron Anders 13-Jun-11 9:20am View
Well all attepts to access the Slave instances has proved un fruitful very likely due to my lack of experience in this area.

So I took a look at the ROT and early indications are promising. I have issues with System.AccessViolationExceptions accessing my slave from the ROT but will post this in another thread.

Thanks for all the help.

Ron Anders 10-Jun-11 14:22pm View
Groveling and down on my face as dead....

That produces:

error C2277: 'Cbcrshimcontrol::{ctor}' : cannot take address of this member function

error C2059: syntax error : ')'

error C2227: left of '->MidiOutFromMaster' must point to class/struct/union/generic type

... Sorry. The syntax of all this baffles me so all I can do is return errors.

Thank you so much for trying to help me.
Ron Anders 10-Jun-11 8:32am View
Thank you so very much!

When I compile the "overseer" I get one pesky compiler error
that I can't get rid of.

error C2059: syntax error : ')'

//// On the following line.


Where Cbcrshimcontrol is the Thingamabob object, SlavePtr is the address
of Thingamabob that was sent over, MidiOutFromMaster is the static member function to be called, and MidiMsg is the DWORD data to be sent to it.

Again, thank you so much for the help.