Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

Brian Shifrin

@Brian Shifrin
About
Posts
172
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • FreeLibrary question
    B Brian Shifrin

    Any way to force process to unload library???? I working on update component ( oracle ), it seems i can do LoadLibrary and FreeLibrary when needed just ok, except for dll's been locked by OS. I am aware of debug setting for that tells XP to unload every library it is not been used, but this is way to drastic. Couple of other options comes to mind, but I don't want to reinvent the wheel and not even sure it would work. 1) From process A create process B, when done exit B hoping cleanup would unload DLL or may be just issue plain kill. 2) allocate memory, load dll (PE), do fixup entry table etc etc etc as long as darn LoadLibrary is not been used. 3) Call freelibrary until XP frees stupid library or I blow away my stack. 4) Other options? Thanks, Brian

    C / C++ / MFC question oracle data-structures debugging performance

  • Accessing all child windows from the main window
    B Brian Shifrin

    There are plenty of ways to accomplish this... You can iterate with GetWindowTop, GetNextWindow; To get class name: GetClassName If you are the one creating them make all windows support some protocol: make them all respond to some message like "WM_APP+100" with some value, or use existing message such as WM_GETTEXT. If not, install some hook via InitCommonControlSex.... Anyway... good luck

    C / C++ / MFC question debugging learning

  • want help about scroll bar
    B Brian Shifrin

    Normaly you should set timer, when in drag mode and cursor x pixels from top; and then inside OnTimer handler scroll window. Brian

    C / C++ / MFC help tutorial question

  • Passing DB handle between applications
    B Brian Shifrin

    >Is anyone aware if it is possible to pass a db handle between two seperate applications? Behavior varies from one database to another, from driver, etc etc etc. With Oracle sqlnet api handle may be can passed btw processes, also not supported. SqlLib handle, sqllib api can be passed safely cross boundary and I think is supported. ODBC drivers do NOT support such behavior, it may or may not work with next update of oracle or vendor driver. Proper solution would be to build out of process STA com object, that performs access to database.

    C / C++ / MFC database question

  • How could print a line without ending the page?
    B Brian Shifrin

    StartDoc / EndDoc - designed to protect multipage documents from interspersed with others. PrintJob is suspended until EndDoc is called. >How could I do printing like the POS terminal printer? For remote spoolers - you can not, should not, and will not be allowed to; local - open device e.g. par port/usb and write directly. Even if local with direct write it still likely not work with most modern printers: laser printers, etc .... Brian

    C / C++ / MFC question

  • How to get the user group in win NT/2000/XP
    B Brian Shifrin

    NetUserGetGroups or IADsUser::Groups

    C / C++ / MFC question json help tutorial

  • dll build problem
    B Brian Shifrin

    That checkbox never worked for me.... I would modify .dsp to: LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo TargetPath=.\Release\My.lib from LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386 # ADD LINK32 /nologo /subsystem:windows /dll /machine:I386

    C / C++ / MFC help c++ tutorial question

  • required info about projects in c++
    B Brian Shifrin

    A.I? Stock trading systems, Power switches Router links status info CPU branch predictions MxN queues (M people in N lines at the register) Traffic control sytems.

    C / C++ / MFC c++

  • Slow Editor in VC+ 6.0
    B Brian Shifrin
    1. Are you using visual assist, or any other pluggings? See if you can turn'em off improve performance... Another option is to delete *.ncb, *.opt, *.clw... If *.opt is corrupt vc editing will be very slow. Brian
    C / C++ / MFC c++ question

  • Member function pointer
    B Brian Shifrin

    With classes you have two options: 1) make function static, so that all objects of the type MyClass reference the same static function. In this case you can use MyClass::FunctionNeededPointer 2) Function you are trying to pass is not static. To pass function pointer you should use something like "this->FunctionNeededPointer", since function obviously has very little meaning outside of class scope... 3) Here is how you can define function type typedef void (MYFUNCTION)(float*,int,int); void Function(MYFUNCTION *p); { Function(&this->FunctionNeededPointer); } Brian

    C / C++ / MFC help

  • VB COM problem
    B Brian Shifrin

    VB6 can only create STA components, and in my opinion is worthless for web development. Second: something wrong with your design don't you think? When web component takes 85 minutes to complete? Brian

    COM question com sysadmin testing

  • if my apps trial period expired
    B Brian Shifrin

    Neither, I would think you want to show nice dialog: "Trial period expired", visit website to purchase licenses and get free upgrades. Writing over executable with "0101" is childish and not productive. On the day X user could have clicked on your executable by mistake and closed app. Next thing he/she knows application exits w/o warning... Is it broken? Messed up? Would writing over executable stop even novice hacker? I doubt that. All it takes to nop area "call WriteFile[A]"... Brian

    C / C++ / MFC question

  • Bug in CStringT operator=
    B Brian Shifrin

    The same code was VC6.. It causes read out of bound warning in BoundChecker & Purify, but also pretty harmless. Also note, if you change (via WideCharToMultiByte) - 1 to (via WideCharToMultiByte) you will break ATL CComBSTR, and may be some others.

    C / C++ / MFC help c++ performance announcement

  • When I meet the character "%"...
    B Brian Shifrin

    Most databases require special characters to be escaped if they are part of sql. For some databases you can choose you escape sequence others have predefined '\'.... Characters '[,=+-&%#!@">

    C / C++ / MFC help c++ database question

  • Is it possible to restart my application from within my application?
    B Brian Shifrin

    Yes, few solutions awailable: 1) External executable, when given control restarts app. 2) Create batch file that restarts application with flag delete on close, execute it, and exit application. 3) Same executable, or new version of exec or exe making copy of itself, with when started with "reboot" command option, waits for executer to close, places itself into original directory, and re-starts itself. I used to use (1), now I use (3) for self-update.

    C / C++ / MFC question

  • CMap Efficiency???
    B Brian Shifrin

    CMap is ok, STL is better.... CMap uses hashbuckets, efficency based on size of the data, hash alg, etc etc etc.. Multiple keys can be achived by multiple maps with . You can reduce initialize penalty, by initializing maps as needed.. Brian

    C / C++ / MFC question algorithms

  • printer help?
    B Brian Shifrin

    There aren't any good way to get printer status in windows with most print drivers.... 1) First 2k, and XP does not poll printer status unless you submit a job. 2) GetPrinter return status success even if printer turned off 3) Let's say you submited job... and do something like GetJob.... - Error reported after ~60 seconds - Most print drivers will only report "printer out of paper" as universal error, printer offline / opened / low inc -> "out of paper". - Now let's say spooler returned status printed and job removed from the job queue. It really means nothing. Printer buffers are so large these days your entire job could be spooled to printer buffer before printer even tried to print. - You detected somewhat error in the print queue, and decided to cancel the job... it takes about 90 seconds to cancel print job... If during those 90 seconds error condition is fixed, job will be printed anyway... I wrote some code in the past for "secured & guaranted" check printing and it was a pain ... Had to exclude number of printers ( badly written drivers )... Also AddMonitor is helpfull but only for local printing....

    C / C++ / MFC c++ json help question

  • Kill a process!!
    B Brian Shifrin

    Instead use ShellExecuteEx and get Process handle, followed with TerminateProcess.... Brian

    C / C++ / MFC question c++ linux help tutorial

  • upside down Bitmap image
    B Brian Shifrin

    dc.SetWindowOrg(m_rect.TopLeft());

    C / C++ / MFC graphics c++ dotnet help

  • Does it have some memory leak?
    B Brian Shifrin

    No it is not possible to have a leak, char[100] allocate memory on the stack, when you exit function memory will be simply popped. In fact if you had allocated memory with: a = malloc(100); a[1] = NULL; free(a); you would not be leaking, de-allocator knows what size you allocated.

    C / C++ / MFC c++ performance question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups